Sign up to receive free email alerts when patent applications with chosen keywords are publishedSIGN UP

Abstract:

A system, method and memory medium for operating on an electrocardiogram
(ECG) signal. A multiscale short-time Fourier transform (STFT) is perform
on a set of ECG samples {s(n)} to obtain a transform array. For each
sufficiently energetic peak in the transform array, a refined window
width value and a refined window displacement value is generated by:
computing an inner product between the set of samples and each of a
plurality of functions, where the plurality of functions are sufficiently
close to a coarse approximation function given by the peak location; and
solving a linear system Av=c for the unknown vector v, where the vector c
is determined by the inner products, where the matrix A is determined by
the center times of the plurality of functions. After appropriate
selection, the refined window width and refined window displacement may
be used to represent ECG waveform features.

Claims:

1. A computer-readable memory medium storing program instructions,
wherein the program instructions, if executed by a computer system, cause
the computer system to: perform a multiscale short-time Fourier transform
(STFT) on a set of samples to obtain a transform array that is
parameterized by window width, window displacement τ and frequency
ω, wherein the set of samples represents a portion of an
electrocardiogram (ECG) signal, wherein the portion of the ECG signal
includes a number of waveform features; operate on the transform array to
determine a plurality of peaks in the transform array, wherein said
operating includes determining, for each of the plurality of peaks, a
window width value, a window displacement value, a frequency value and a
power value; generate, for each of the plurality of peaks, a refined
window width value and a refined window displacement value, by: computing
an inner product between the set of samples and each of a plurality of
functions, wherein the plurality of functions are windowed sinusoids (a)
having a common frequency equal to the frequency value of the peak, (b)
being centered at times that are in a neighborhood of the window
displacement value of the peak, and (c) having a common width that is
based on the width value of the peak; and solving a linear system Av=c
for the unknown vector v, wherein the vector c is determined by the inner
products, wherein the matrix A is determined by said times that are in
the neighborhood of the window displacement value of the peak.

2. The memory medium of claim 1, wherein the program instructions, if
executed by the computer system, further cause the computer system to:
identify a first of the peaks as corresponding to a QRS complex based on
a determination that the power value of the first peak exceeds a
threshold value and that the refined window displacement value for the
first peak satisfies one or more time constraints; compute a QRS onset
time and/or a QRS offset time based on the refined window displacement
value and the refined window width of the first peak; and display the QRS
onset time and/or the QRS offset time via a display device.

3. The memory medium of claim 2, wherein the program instructions, if
executed by the computer system, further cause the computer system to:
repeat said performing, said operating and said generating for a series
of sets of samples of the ECG signal.

4. The memory medium of claim 2, wherein the threshold value is an
adaptive threshold that changes over time.

5. The memory medium of claim 2, wherein the one or more time constraints
include a time constraint on the refined window displacement value of the
first peak relative to a time of a previously identified feature in the
ECG signal.

6. The memory medium of claim 1, wherein the program instructions, if
executed by the computer system, further cause the computer system to:
compute, for each peak Pj of the plurality of peaks, a windowed
sinusoid function hj that is determined by the refined window width
value of the peak Pj, the refined window displacement value of the
peak Pj, and the frequency value of the peak Pj; generate a
linear combination of the windowed sinusoid functions hj; and
display the real part of the linear combination via a display device.

7. The memory medium of claim 1, wherein the ECG signal is a human ECG
signal, wherein the waveform features include one or more of the
following: a P wave, a QRS complex and a T wave.

9. The memory medium of claim 1, wherein said operating on the transform
array includes searching for the NP peaks of largest absolute value
in the transform array, wherein NP is a positive integer.

10. The memory medium of claim 9, wherein said searching is restricted to
a band of frequencies that is smaller than the frequency range of the
multiscale STFT.

11. A computer-readable memory medium storing program instructions,
wherein the program instructions, if executed by a computer system, cause
the computer system to: receive samples of a portion of an
electrocardiogram (ECG) signal, wherein said portion of the ECG signal
contains a waveform feature; operate on the samples to compute a
plurality of short-time Fourier transforms (STFT), wherein each of the
STFTs is computed using a different value of window width, wherein each
of the STFTs is a function of window displacement time τ and
frequency ω; search the plurality of STFTs to determine an initial
set of parameters values that characterize the waveform feature, wherein
the initial set of parameter values includes a first window displacement
time τ0, a first frequency ω0 and a first window
width σ0; compute an inner product of the samples with each of
a first function, a second function and a third function to obtain
respectively a first complex value, a second complex value and a third
complex value, wherein the first, second and third functions are windowed
sinusoids (a) having a common frequency equal to the first frequency
ω0, (b) being centered at times that are in a neighborhood of
the first window displacement time τ0, and (c) having a common
width that is based on the first window width σ0; compute a
time of the waveform feature and a duration of the waveform feature based
on the first, second and third complex values and based on said times in
the neighborhood of the first window displacement time τ0; and
store the waveform feature time and the waveform feature duration in a
memory.

12. The memory medium of claim 11, wherein the program instructions, if
executed by the computer system, further cause the computer system to:
display the waveform feature time or a visual indication of the waveform
feature time via a display device.

13. The memory medium of claim 11, wherein the waveform feature is a QRS
complex, wherein the program instructions, if executed by the computer
system, further cause the computer system to: compute an onset time
and/or an offset time of the QRS complex based on the waveform feature
time and the waveform feature duration.

14. The memory medium of claim 11, wherein the waveform feature is a QRS
complex, a T wave or a P wave.

15. The memory medium of claim 11, wherein the plurality of STFTs are
computed using Gaussian windows.

17. The memory medium of claim 11, wherein said searching includes
searching for a local maximum or global maximum of absolute value in the
STFTs.

18. The memory medium of claim 11, wherein the ECG signal is a human ECG
signal, wherein said searching is restricted to frequencies in the
interval from 10 Hz to 25 Hz.

19. The memory medium of claim 11, wherein said computing the waveform
feature time and the waveform feature duration includes solving a linear
system Av=c for the unknown vector v, wherein the matrix A is determined
by said times in the neighborhood of the first window displacement time
τ0, wherein the vector c is determined by the first, second and
third complex values.

20. The memory medium of claim 19, wherein the vector c is determined by
the expression: c=[ln|z0|/|z-1|,ln|z0|/|z+1|]T,
wherein z0, z-1 and z+1 are the first, second and third
complex values, respectively.

21. The memory medium of claim 11, wherein the times that are in the
neighborhood of the first window displacement time τ0 include
τ0, τ.sub.0.DELTA.τ and τ.sub.0-.DELTA.τ, where
Δτ is a positive real number.

22. A method comprising: a computer system receiving samples of a portion
of an electrocardiogram (ECG) signal, wherein said portion of the ECG
signal contains a waveform feature; the computer system operating on the
samples to compute a plurality of short-time Fourier transforms (STFT),
wherein each of the STFTs is computed using a different value of window
width, wherein each of the STFTs is a function of window displacement
time τ and frequency ω; the computer system searching the
plurality of STFTs to determine an initial set of parameters values that
characterize the waveform feature, wherein the initial set of parameter
values includes a first window displacement time τ0, a first
frequency ω0 and a first window width σ0; the
computer system computing an inner product of the samples with each of a
first function, a second function and a third function to obtain
respectively a first complex value, a second complex value and a third
complex value, wherein the first, second and third functions are windowed
sinusoids (a) having a common frequency equal to the first frequency
ω0, (b) being centered at times that are in a neighborhood of
the first window displacement time τ0, and (c) having a common
width that is based on the first window width σ0; the computer
system computing a time of the waveform feature and a duration of the
waveform feature based on the first, second and third complex values and
based on said times in the neighborhood of the first window displacement
time τ0; and the computer system storing the waveform feature
time and the waveform feature duration in a memory.

Description:

FIELD OF THE INVENTION

[0001] The present invention relates to the field of signal processing,
and more particularly, to a system and method for detecting QRS complexes
within electrocardiogram (ECG) signals.

DESCRIPTION OF THE RELATED ART

[0002] An electrocardiogram (ECG) provides information about an
individual's cardiac health. An ECG is commonly used in clinical
applications to help medical personnel diagnose cardiac diseases. Among
the features present in the ECG signal (e.g., features such as the P
wave, the T wave, QRS complex, etc.), the QRS complex is very significant
because other points in the ECG signal are often measured relative to the
QRS onset, the R peak and the QRS offset. During the past several
decades, various methods have been proposed for the detection of the QRS
complexes from contaminated ECG signals. However, most of these methods
require a large computation load. Thus, there exists a need for
computationally efficient methods for detecting the QRS complex.

SUMMARY

[0003] In one set of embodiments, a method for operating on an
electrocardiogram (ECG) signal may include the following processing
operations.

[0004] A computer system may perform a multiscale short-time Fourier
transform (STFT) on a set of samples {s(n)} to obtain a transform array
that is parameterized by window width, window displacement τ and
frequency ω. The set of samples may represent a portion of an
electrocardiogram (ECG) signal. The signal portion may include a number
of waveform features.

[0005] The computer system then may operate on the transform array to
determine a plurality of peaks in the transform array. The action of
operating on the transform array may include determining, for each of the
plurality of peaks, a window width value, a window displacement value, a
frequency value and a power value.

[0006] The computer system may generate, for each of the plurality of
peaks, a refined window width value and a refined window displacement
value, by: computing an inner product between the set of samples and each
of a plurality of functions, where the plurality of functions are
windowed sinusoids (a) having a common frequency equal to the frequency
value of the peak, (b) being centered at times that are in a neighborhood
of the window displacement value of the peak, and (c) having a common
width that is based on the width value of the peak; and solving a linear
system Av=c for the unknown vector v, where the vector c is determined by
the inner products, where the matrix A is determined by the times that
are in the neighborhood of the window displacement value of the peak. In
one embodiment, the functions are Gaussian-modulated complex
exponentials.

[0007] In some embodiments, the computer system may also: (d) identify one
of the peaks as corresponding to a QRS complex based on a determination
that the power value of the peak exceeds a threshold value and that the
refined window displacement value for the peak satisfies one or more time
constraints; (e) compute a QRS onset time and/or a QRS offset time based
on the refined window displacement value and the refined window width of
the first peak; and (f) display the QRS onset time and/or the QRS offset
time via a display device. The threshold value may be an adaptive
threshold that changes over time. The one or more time constraints may
include a time constraint on the refined window displacement value of the
first peak relative to a time of a previously identified feature in the
ECG signal.

[0008] In some embodiments, the computer system may also: compute, for
each peak Pj of the plurality of peaks, a windowed sinusoid function
hj that is determined by the refined window width value of the peak
Pj, the refined window displacement value of the peak Pj, and
the frequency value of the peak Pj; generate a linear combination of
the windowed sinusoid functions hj; and display the real part of the
linear combination via a display device.

[0009] The ECG signal may derive from any of a variety of species of
organism. For example, in one embodiment, the ECG signal is a human ECG
signal, and the waveform features include one or more of the following: a
P wave, a QRS complex and a T wave.

[0010] In some embodiments, the action of operating on the transform array
may include searching for the NP peaks (or local maxima) of largest
absolute value in the transform array, where NP is a positive
integer. In one embodiment, the action of searching for NP peaks is
restricted to a band of frequencies that is smaller than the frequency
range of the multiscale STFT.

[0011] In another set of embodiments, a method for operating on an ECG
signal may include the following operations.

[0012] A computer system may receive samples of a portion of an
electrocardiogram (ECG) signal, where the signal portion contains a
waveform feature.

[0013] The computer system may operate on the samples to compute a
plurality of short-time Fourier transforms (STFT), where each of the
STFTs is computed using a different value of window width, where each of
the STFTs is a function of window displacement time τ and frequency
ω.

[0014] The computer system may search the plurality of STFTs to determine
an initial set of parameters values that characterize the waveform
feature, where the initial set of parameter values includes a first
window displacement time τ0, a first frequency ω0 and
a first window width σ0.

[0015] The computer system may compute an inner product of the samples
with each of a first function, a second function and a third function to
obtain respectively a first complex value, a second complex value and a
third complex value. The first, second and third functions may be
windowed sinusoids (a) having a common frequency equal to the first
frequency ω0, (b) being centered at times that are in a
neighborhood of the first window displacement time τ0, and (c)
having a common width that is based on the first window width
σ0.

[0016] The computer system may compute a time of the waveform feature and
a duration of the waveform feature based on the first, second and third
complex values and based on the times in the neighborhood of the first
window displacement time τ0.

[0017] The computer system may store the waveform feature time and the
waveform feature duration in a memory.

[0018] In some embodiments, the computer system may display the waveform
feature time or a visual indication of the waveform feature time via a
display device.

[0019] In some embodiments, the computer system may compute an onset time
and/or an offset time of the QRS complex based on the waveform feature
time and the waveform feature duration. The onset time and/or the offset
time may be display via the display device.

[0020] The waveform feature may be a feature such as the QRS complex or
the T wave or the P wave of a human ECG signal.

[0021] The plurality of STFTs may be computed using Gaussian windows.
Although, a wide variety of other types of windows may be used.

[0022] The windowed sinusoids may be Gaussian-modulated complex
exponentials, although other types of windowed sinusoids may be used.

[0023] In some embodiments, the action of searching the plurality of STFTs
may include searching for a local maximum or global maximum of absolute
value in the STFTs.

[0024] In some embodiments, the action of searching the plurality of STFTs
may be restricted to frequencies in a predetermined frequency interval,
e.g., the interval from 10 Hz to 25 Hz.

[0025] In some embodiments, the action of computing the waveform feature
time and the waveform feature duration includes solving a linear system
Av=c for the unknown vector v, where the matrix A is determined by the
times in the neighborhood of the first window displacement time
τ0, where the vector c is determined by the first, second and
third complex values. In one embodiment, the vector c is determined by
the expression:

c=[ln|z0|/|z-1|, ln|z0|/|z+1|]T,

where "ln" denotes the natural logarithm, where the superscript "T"
denotes the transpose operator, where z0, z-1 and z+1 are
the first, second and third complex values, respectively.

[0026] In some embodiments, the times that are in the neighborhood of the
first window displacement time τ0 include τ0,
τ0+Δτ and τ0-Δτ, where Δτ
is a positive real number.

BRIEF DESCRIPTION OF THE DRAWINGS

[0027] A better understanding of the present invention can be obtained
when the following detailed description of the preferred embodiments is
considered in conjunction with the following drawings.

[0038]FIG. 11 illustrates one possible realization for display output
provided by the method of FIG. 5.

[0039] While the invention is susceptible to various modifications and
alternative forms, specific embodiments thereof are shown by way of
example in the drawings and are herein described in detail. It should be
understood, however, that the drawings and detailed description thereto
are not intended to limit the invention to the particular form disclosed,
but on the contrary, the intention is to cover all modifications,
equivalents and alternatives falling within the spirit and scope of the
present invention as defined by the appended claims.

DETAILED DESCRIPTION OF THE INVENTION

[0040] Terminology

[0041] The following is a glossary of terms used in the present document.

[0042] Memory Medium--A memory medium is a medium configured for the
storage and retrieval of information. Examples of memory media include:
various kinds of semiconductor memory such as RAM and ROM; various kinds
of magnetic media such as magnetic disk, tape, strip and film; various
kinds of optical media such as CD-ROM and DVD-ROM; various media based on
the storage of electrical charge and/or other physical quantities; media
fabricated using various lithographic techniques; etc. The term "memory
medium" may also include a set of two or more memory media which reside
at different locations, e.g., at different computers that are connected
over a network.

[0044] Program--the term "program" is intended to have the full breadth of
its ordinary meaning As used herein, the term "program" means: 1) a
software program which may be stored in a memory and is executable by a
processor, or, 2) a hardware configuration program useable for
configuring a programmable hardware element. Any of the method
embodiments described herein, or, any combination of the method
embodiments described herein, or, any subset of any of the method
embodiments described herein, or, any combination of such subsets may be
implemented in terms of one or more programs.

[0045] Software Program--the term "software program" is intended to have
the full breadth of its ordinary meaning, and includes any type of
program instructions, code, script and/or data, or combinations thereof,
that may be stored in a memory medium and executed by a processor.
Exemplary software programs include: programs written in text-based
programming languages such as C, C++, Java®, Pascal, Fortran, etc.;
graphical programs (programs written in graphical programming languages);
assembly language programs; programs that have been compiled to machine
language; scripts; and other types of executable software. A software
program may comprise two or more subprograms that interoperate in some
manner.

[0046] Hardware Configuration Program--a program, e.g., a netlist or bit
file, that can be used to program or configure a programmable hardware
element.

[0047] Graphical Program--A program comprising a plurality of
interconnected nodes or icons, where the plurality of interconnected
nodes or icons visually indicate functionality of the program. A
graphical program is a type of diagram.

[0048] The following provides examples of various aspects of graphical
programs. The following examples and discussion are not intended to limit
the above definition of graphical program, but rather provide examples of
what the term "graphical program" encompasses.

[0049] The nodes in a graphical program may be connected in one or more of
a data flow, control flow, and/or execution flow format. The nodes may
also be connected in a "signal flow" format, which is a subset of data
flow.

[0050] Exemplary graphical program development environments which may be
used to create graphical programs include LabVIEW, DasyLab, DiaDem and
Matrixx/SystemBuild from National Instruments, Simulink from the
MathWorks, VEE from Agilent, WiT from Coreco, Vision Program Manager from
PPT Vision, SoftWIRE from Measurement Computing, Sanscript from
Northwoods Software, Khoros from Khoral Research, SnapMaster from HEM
Data, VisSim from Visual Solutions, ObjectBench by SES (Scientific and
Engineering Software), and VisiDAQ from Advantech, among others.

[0051] The term "graphical program" includes models or block diagrams
created in graphical modeling environments, where the model or block
diagram comprises interconnected nodes or icons that visually indicate
operation of the model or block diagram; exemplary graphical modeling
environments include Simulink, SystemBuild, VisSim, Hypersignal Block
Diagram, etc.

[0052] A graphical program may be represented in the memory of the
computer system as data structures and/or program instructions. The
graphical program, e.g., these data structures and/or program
instructions, may be compiled or interpreted to produce machine language
that accomplishes the desired method or process as shown in the graphical
program.

[0053] Input data to a graphical program may be received from any of
various sources, such as from a device, a unit under test, a process
being measured or controlled, another computer program, a database, or
from a file. Also, a user may input data to a graphical program or
virtual instrument using a graphical user interface, e.g., a front panel.

[0054] A graphical program may optionally have a GUI associated with the
graphical program. In this case, the plurality of interconnected nodes
are often referred to as the block diagram portion of the graphical
program.

[0055] Data Flow Graphical Program (or Data Flow Diagram)--A graphical
program or diagram comprising a plurality of interconnected nodes, where
the connections between the nodes indicate that data produced by one node
is used by another node.

[0056] Node--In the context of a graphical program, an element that may be
included in a graphical program. The graphical program nodes in a
graphical program may also be referred to as blocks. A node may have an
associated icon that represents the node in the graphical program, as
well as underlying code and/or data that implements functionality of the
node. Exemplary nodes (or blocks) include function nodes, sub-program
nodes (sub-VIs), terminal nodes, structure nodes, etc. Nodes may be
connected together in a graphical program by connection icons or wires.

[0057] Graphical User Interface--this term is intended to have the full
breadth of its ordinary meaning. The term "Graphical User Interface" is
often abbreviated to "GUI". A GUI may include one or more input GUI
elements, one or more output GUI elements, or both input and output GUI
elements.

[0058] The following provides examples of various aspects of GUIs. The
following examples and discussion are not intended to limit the ordinary
meaning of GUI, but rather provide examples of what the term "graphical
user interface" encompasses.

[0059] A GUI may comprise a single window having one or more GUI Elements,
or may comprise more than one window each having one or more GUI
Elements.

[0060] A GUI may be associated with a diagram, e.g., a graphical program.
In this instance, various mechanisms may be used to connect GUI Elements
in the GUI with nodes or icons in the diagram/graphical program. For
example, when Input Controls and Output Indicators are created in the
GUI, corresponding nodes (e.g., terminals) may be automatically created
in the diagram or graphical program. Alternatively, the user can place
terminal nodes in the diagram which may cause the display of
corresponding GUI Elements front panel objects in the GUI, either at edit
time or later at run time. As another example, the GUI may comprise GUI
Elements embedded in the block diagram portion of the graphical program.

[0061] Front Panel--A Graphical User Interface that includes input
controls and output indicators, and that enables a user to interactively
control or manipulate the input being provided to a program or diagram,
and view output of the program or diagram, during execution.

[0062] A front panel is a type of GUI. A front panel may be associated
with a diagram or graphical program as described above.

[0063] In an instrumentation application, the front panel can be
analogized to the front panel of an instrument. In an industrial
automation application the front panel can be analogized to the MMI (Man
Machine Interface) of a device. The user may adjust the controls on the
front panel to affect the input, and view the output on the respective
indicators.

[0067] Computer System--any of various types of computing or processing
systems, including a personal computer (PC), mainframe computer system,
workstation, laptop, network appliance, Internet appliance, personal
digital assistant (PDA), television system, grid computing system, or
other device or combinations of devices. In general, the term "computer
system" can be broadly defined to encompass any device (or combination of
devices) having at least one processor that executes instructions that
are on memory medium.

[0068] Measurement Device--includes instruments, data acquisition devices,
smart sensors, electrocardiogram monitoring equipment and any of various
types of devices that are operable to acquire and/or store data. A
measurement device may also optionally be further operable to analyze or
process the acquired or stored data. Examples of a measurement device
include an instrument, such as a traditional stand-alone "box"
instrument, a computer-based instrument (instrument on a card) or
external instrument, a data acquisition card, a device external to a
computer that operates similarly to a data acquisition card, a smart
sensor, one or more DAQ or measurement cards or modules in a chassis, an
image acquisition device, such as an image acquisition (or machine
vision) card, a video capture board, a smart camera, a motion control
device, a robot having machine vision, and other similar types of
devices. Exemplary "stand-alone" instruments include oscilloscopes,
multimeters, signal analyzers, electrocardiogram monitors, arbitrary
waveform generators, spectroscopes, and similar measurement, test, or
automation instruments.

[0069] A measurement device may be further operable to perform control
functions, e.g., in response to analysis of the acquired or stored data.
For example, the measurement device may send a control signal to an
external system, such as a motion control system or to a sensor, in
response to particular data. A measurement device may also be operable to
perform automation functions, i.e., may receive and analyze data, and
issue automation control signals in response.

[0070] Embodiments of the present invention may be realized in any of
various forms. For example, in some embodiments, the present invention
may be realized as a computer-implemented method, a computer-readable
memory medium, or a computer system. In other embodiments, the present
invention may be realized using one or more custom-designed hardware
devices such as ASICs or FPGA's.

[0071] A computer-readable memory medium is a memory medium that stores
program instructions and/or data, where the program instructions, if
executed by a computer system, cause the computer system to perform,
e.g., any of a method embodiments described herein, or, any combination
of the method embodiments described herein, or, any subset of any of the
method embodiments described herein, or, any combination of such subsets.

[0072] In some embodiments, a computer system may be configured to include
a processor (or a set of processors) and a memory medium. The memory
medium stores program instructions. The processor is configured to read
and execute the program instructions from the memory medium. The program
instructions are executable to implement any of the various method
embodiments described herein (or, any combination of the method
embodiments described herein, or, any subset of any of the method
embodiments described herein, or, any combination of such subsets). The
computer system may be realized in any of various forms. For example, the
computer system may be a personal computer (in any of its various
realizations), a workstation, a computer on a card, an
application-specific computer in a box, a server computer, a client
computer, a hand-held device, a wearable computer, etc.

[0073] In some embodiments, a set of computers distributed across a
network may be configured to partition the effort of executing a
computational method (e.g., any of the method embodiments disclosed
herein). In some embodiments, a first computer may be configured to
acquire an ECG signal and send the resulting ECG signal data to a second
computer over a network (such as the Internet). The second computer may
operate on the ECG signal data according to any of the method embodiments
described herein, or, any combination of the method embodiments described
herein, or, any subset of any of the method embodiments described herein,
or, any combination of such subsets.

[0074] Given two functions f and g (i.e., functions of time t), let
<f,g> denote the inner product given by:

< f , g >= ∫ - ∞ ∞ f ( t )
g * ( t ) t , ( 1 ) ##EQU00001##

where the superscript "*" denotes complex conjugation. The functions f
and g are allowed to be complex functions. Thus, the inner product of two
functions might be a complex number.

[0075] Let ∥f∥ denote the function norm given by
∥f∥=(<f,f>)1/2. The function norm
∥*∥ provides a means of measuring the "length" of a
given function f. It also provides a means for measuring the distance
between two functions f and g, i.e., dist(f,g)=∥f-g∥.

[0076] Given a real number τ, a real number ω and a positive
real number α, let h.sub.τ,ω,α be the function of
time given by:

The notation exp[z] denotes the exponential function acting on the
argument z. According to the above-specified norm, the function
h.sub.τ,ω,α has length one. The function
h.sub.τ,ω,α is a modulated Gaussian since it is the
product of a Gaussian function exp[-(α/2)(t-τ)2] and a
complex sinusoid exp[jω(t-τ)]. The parameter τ is the
center time of the Gaussian function. The parameter α represents
the inverse variance of the Gaussian function, and thus, is a measure of
the narrowness of the Gaussian function. The parameter ω is the
frequency of the complex sinusoid.

[0077] Let K be the class of functions given by

K={h.sub.τ,ω,α: τ is real, ω is real, α
is positive and real}. (3)

[0078] Each vector (τ, ω, α) in the parameter space
G=R×R×R.sup.+ specifies a corresponding function
h.sub.τ,ω,α in class K. R denotes the set of real
numbers. R.sup.+ denotes the set of positive real numbers. The notation
"A×B" denotes the Cartesian product of sets A and B.

[0079] Given an arbitrary function s(t) in the space of all continuous
functions, one may imagine orthogonally projecting the function s(t) onto
the linear subspace L.sub.τ,ω,α (over the field of
complex numbers) given by the function h.sub.τ,ω,α. Let
P.sub.τ,ω,α(s) denote the projection of function s onto
the linear subspace L.sub.τ,ω,α. The projection
P.sub.τ,ω,α(s) is given by:

P.sub.τ,ωα(s)=<s,
h.sub.τ,ω,α>h.sub.τ,ω,α. (4)

[0080] The length of the projection P.sub.τ,ω,α(s) is
given by |<s, h.sub.τ,ω,α>|, where |z| denotes the
absolute value of the complex number z.

[0082] This patent specification discloses among other things a method for
estimating the optimal parameter vector vopt in the situation where
s(t) represents an electrocardiogram (ECG) signal or some portion of an
ECG signal.

[0083] An ECG signal may have a waveform structure as suggested in FIG. 1.
Observe that the waveform structure includes a number of waveform
features such as a P wave, a QRS complex, a T wave and a U wave. The QRS
complex is that portion of the structure that corresponds to the QRS
interval. The definition of the QRS complex and the QRS interval are well
understood from the literature of physiology and medicine.

[0084] The exact structure of an ECG signal will vary from person to
person, and perhaps also from time to time in the same person. In some
individuals, certain portions of the waveform structure may be missing or
different in appearance or amplitude. For example, in some persons the U
wave may be missing. In some persons, one or more portions of the QRS
complex may be missing. Also, in certain states of cardiac disease,
various portions of the waveform structure may be altered in form,
altered in amplitude, or entirely missing.

[0085]FIG. 2 shows another example of an ECG signal, where the
definitions of PR interval, PR segment, QRS interval, ST segment and ST
interval are indicated.

[0086] Given a time-limited portion of an ECG signal s(t), e.g., the
portion illustrated in FIG. 1, imagine approximating the signal s(t) by
an expression of the form:

where the NP terms in the summation correspond to the NP most
energetic features in the time-limited portion, e.g., features such as
QRS complexes, T waves, P waves and U waves. (The notation Re[z] denotes
the real part of the complex quantity z.) The vectors v(1), v(2), . . . ,
v(NP) are optimal parameter vectors for the NP respective
features. An appropriately-programmed computer system may compute the
optimal parameter vectors {v(j)} for the features (or some subset of the
features) based on a method to be described below.

[0087] In some embodiments, the computer system may construct an
approximating function x(t) for the signal s(t) based on the right hand
side of expression (6). The approximating function x(t) may be displayed
via a display device, e.g., in response to a user request.

[0088] In some embodiments, the optimal parameter vectors {v(j)} and the
corresponding coefficients {<s, hv(j)>} may be analyzed to
determine which of the NP features correspond to QRS complexes (if
any). Each parameter vector v that is identified as corresponding to a
QRS complex may be used to estimate the onset and offset time of that QRS
complex. For example, given that vector v=(τ, ω, α) is
identified as corresponding to a QRS complex, the onset and offset times
for the QRS complex may be estimated based on the expressions:

[0089] In some embodiments, the computer system may compute an onset time
and offset time for each of the NP features. The onset time and
offset time for any given one of the features may be computed based on
the optimal delay time τ and the optimal α of that feature
using equations (7A) and (7B).

[0090] The number NP is greater than or equal to one. The number
NP may depend on the duration of the time-limited portion, i.e., the
captured portion, of the ECG signal. If an estimate of heart rate is
available, the number NP may depend on the estimated heart rate. The
number NP may also depend on the species of organism under analysis
and/or on an operational mode selection.

[0091] In some embodiments, NP is an integer in the range [1,50].

[0092] In one embodiment, where the ECG signal corresponds to the human
heart, NP is set equal to an integer in the range from floor((3
sec-1)*TB) to ceiling((6 sec-1)*TB) inclusive, where
TB is the time duration of the time-limited portion. For example, if
the time-limited portion is one-second in duration, then NP may be a
value in the range [3,6]. A wide variety of other ranges are contemplated
as well.

[0093] In some embodiments, a method for analyzing an ECG signal may
include a coarse estimation process and a refinement process. The coarse
estimation process may operate as outlined by the pseudo-code in FIG. 3.

[0094] At line 310, a computer system may receive a block {s(n)} of
samples of an ECG signal s. (The index n is the discrete time index.) Let
NS denote the number of samples in the received block.

[0095] At lines 320-355, the computer system may perform a multiscale
short-time Fourier transform (STFT) on the sample block {s(n)} to obtain
a transform array S:

The values S[i,j,k] of the array S are complex numbers. The first index i
corresponds to window size. NWS denotes the number of different
window sizes that are used in the multiscale STFT.

[0096] Window size may be measured from the center of the window to the
right (or left) shoulder of the window (or, alternatively, from the left
shoulder to the right shoulder).

[0097] The second index j corresponds to delay time τ (also referred
to herein as "window displacement time"). N.sub.τ denotes the number
of delay times that are used in the multiscale STFT. The third index k
corresponds to frequency ω. N.sub.ω denotes the number of
distinct frequencies used in the multiscale STFT.

[0098] The multiscale STFT uses a window function w(n). The window
function may be nominally centered at time zero. In one embodiment, the
window function is a Gaussian window. In other embodiments, the window
function may be a raised cosine window, a polynomial window, a rational
function window, a Hamming window, a Hann window, a Lanczos window, a
Blackman window, etc.

[0099] The multiscale STFT uses an array of window sizes, {σ(i):
i=0, . . . , NWS-1}. The number NWS is typically greater than
two. In some embodiments, NWS equals three. In other embodiments,
NWS equals an integer in the interval [4,8]. In another embodiment,
NWS is an integer less than or equal to 256. In one embodiment, the
array of window sizes is given by {0.05 sec, 0.1 sec, 0.2 sec}.

[0100] The multiscale STFT also uses an array of τ values, {τ(j):
j=0, . . . , N.sub.τ-1}. For example, in some embodiments, the array
of τ values is given by {j*STEP.sub.τ: j=0, . . . ,
N.sub.τ-1}, where STEP.sub.τ is the step size for delay time
τ. In one embodiment, the value STEP.sub.τ may be a value which
is equal to 0.125*window size. In some embodiments, the value
STEP.sub.τ is in the range from 6 milliseconds to 25 milliseconds.
However, values outside that range are contemplated as well.

[0101] As shown at 330-340, for each pair (i,j) in {0, . . . ,
NWS-1}×{0, . . . , N.sub.τ-1}, the computer system may
operate on the block {s(n)} to generate a localized signal {y(n)}
according to the expression:

[0102] In other words, the signal samples {s(n)} are multiplied by a
horizontally scaled and time-shifted version of the window function w.
The amount of the time shift is determined by τ(j) and the amount of
horizontal scaling is controlled by σ(i).

[0103] At 345, the computer system may perform a discrete-time Fourier
transform (e.g., an FFT) on the localized signal y. The vector result of
the Fourier transform is stored in the vector S[i,j,*].

[0104] At 365, the computer system may search the magnitude array
|S[i,j,k]| over the (i,j,k) space to determine NP distinct peaks (or
local maxima), e.g., the NP largest peaks. Each peak P (or local
maximum) is characterized by a frequency value ωP, a delay
time value τP, a window width value σP, and an
amplitude (or power) value AP. The frequency value ωP
specifies the location of the peak P in the frequency dimension. The
window width value σP specifies the location of the peak P in
the window-width dimension. The delay time τP specifies the
location of the peak in the delay-time dimension.

[0105] The window width may be measured from the center of the window to a
shoulder of the window (or alternatively, from the left shoulder to the
right shoulder of the window). For example, for a Gaussian window
function, the standard deviation may be taken as the window width.

[0106] In some embodiments, the computer system may search the square
magnitude array |S[i,j,k]|2 instead of the magnitude array |S
[i,j,k]|. The square magnitude array may be convenient to use since it
can be computed without a square root operation. (Recall that
|z|2=zz*.)

[0107] In some embodiments, the computer system may constrain the search
to a predetermined frequency interval to increase the likelihood of
locating a peak (or local maximum) that corresponds to a QRS complex. For
example, in one embodiment, the computer system searches over the
frequency interval [10 Hz, 25 Hz].

[0108] In some embodiments, the computer system may impose one or more
time constraints on the search for peaks. For example, the computer
system may require that the separation of the peaks in delay time be at
least ΔTmin, where ΔTmin is the minimum attainable
separation time between any two adjacent waveform features in the ECG
signal.

[0109] As noted above, the method for analyzing an ECG signal may include
a refinement process in addition to the coarse estimation process just
described. In one set of embodiments, the refinement process operates on
the frequency value ωP, the delay time value τP and
the window width value σP of each peak P to determine a
refined estimate for the delay time and a refined estimate for the window
width value. The refinement process may be implemented as follows.

[0110] First, the computer system may compute inner products of the sample
block {s(n)}, respectively, with three particular functions from the
class K:

z0=<s,h.sub.τP.sub.,ωP.sub.,αP&gt-
;, (10A)

z+1=<s,h.sub.τP.sub.+Δτ,ωP.sub.,.a-
lpha.P>, (10B)

z-1=<s,h.sub.τP.sub.-Δτ,ωP.sub.,.a-
lpha.P>, (10C)

where αP is equal to or proportional to
(1/σP)2, where Δτ is a positive value. For
example, in one embodiment, Δτ is a value in the interval (0,
σP]. In another embodiment, Δτ is a value in the
interval (0, 2σP].

[0111] Second, the computer system may solve the following linear system:

[0112] Third, the computer system may compute the refined estimate
τf for delay time and the refined estimate df for window
width based on the expressions:

τf=2b/xf (12A)

df=[(αP-2b)/2bαP]1/2 (12B)

[0113] The computer system may also compute a refined amplitude Af
for the peak P based on the expression:

Af=<s,h.sub.τf.sub.,ωP.sub.,αf&gt-
;, (13)

where αf=(1/df)2=2bαP/(αP-2b).

[0114] After computing the refined delay and the refined window width for
each peak P, the computer system may identify which of the peaks
correspond to a QRS complex.

[0115] In some embodiments, the computer system may identify a peak as
corresponding to a QRS complex if its amplitude AP (or refined
amplitude Af) is larger than a threshold value. In one embodiment,
the threshold value may be a fixed value determined by experimentation.
In another embodiment, the threshold value may be determined by user
input. In yet another embodiment, the threshold value may be a
predetermined fraction of AMAX, where AMAX is the maximum of
the amplitudes {AP} (or refined amplitudes) of the NP peaks. In
yet another embodiment, the threshold value may be a predetermined
fraction of the amplitude (or refined amplitude) of the
previously-identified QRS complex. In yet another embodiment, the
threshold value may be a predetermined fraction of an FIR or IIR
filtration of the amplitudes (or refined amplitudes) of
previously-identified QRS complexes.

[0116] In some embodiments, the computer system may also require that the
refined delay time τf of a peak satisfy one or more time
constraints in order to be identified as a QRS complex. For example, if a
previously identified QRS complex occurred at time t=10 seconds, it would
be impossible for a peak occurring at time t=10.01 seconds to be a QRS
complex because the minimum QRS repetition interval is significantly
larger than 0.01 seconds.

[0117] In one set of embodiments, a method 400 for estimating the time of
a waveform feature in an ECG signal may include the following operations.
See FIG. 4.

[0118] At 410, a computer system may receive a set of samples of a portion
of an electrocardiogram (ECG) signal. The received portion of the ECG
signal contains a waveform feature. The number NS of samples in the
sample set may be an integer based on sampling rate. For example, in one
embodiment, NS equals 250 if the sampling rate is 250 samples per
second. In some embodiments, the number NS is selected to guarantee
that at least one QRS complex is contained with the sample set.

[0119] At 420, the computer system operates on the samples to compute a
plurality of short-time Fourier transforms (STFTs). Each of the STFTs is
computed using a different value of window width. Each of the STFTs is a
function of window displacement time τ and frequency ω. The
STFTs may be computed using Fast Fourier Transforms (FFTs).

[0120] In one embodiment, three STFTs are computed, using window widths of
0.2 sec, 0.1 sec and 0.05 sec respectively. However, other numbers of
STFTs may be computed, and other sets of window width values may be used.

[0121] In some embodiments, the signal samples are subjected to filtering
for baseline removal prior to the computation of the STFTs.

[0122] At 430, the computer system may search the plurality of STFTs to
determine an initial set of parameter values that characterize the
waveform feature, where the initial set of parameter values includes a
first window displacement time τ0, a first frequency
ω0 and a first window width σ0. In one embodiment,
the search process 430 may involve: computing the magnitude of the STFTs
to obtain respective magnitude spectra; and searching for a peak (e.g.,
local or global maximum) in the magnitude spectra. The location of the
peak in the (τ, ω, window width) space may determine the
initial set of parameters.

[0123] The search process 430 may also involve smoothing the magnitude
spectra before searching for the peak. The smoothing operation may allow
the peak to be more reliably located.

[0124] In some embodiments, the search process 430 is restricted to
frequencies in a predetermined range of frequencies. For example, when
the ECG signal is a human ECG signal, the search process may be
restricted to frequencies in the range [10 Hz, 25 Hz]. In another
embodiment, the search process is restricted to the range [8 Hz, 30 Hz].
Different ranges may be used in different application contexts.

[0125] At 440, the computer system may compute an inner product of the
samples with each of a first function, a second function and a third
function to obtain respectively a first complex value, a second complex
value and a third complex value. The first, second and third functions
are windowed sinusoids (a) having a common frequency equal to the first
frequency ω0, (b) being centered at times that are in a
neighborhood U(τ0) of the first window displacement time
τ0, and (c) having a common width that is based on the first
window width σ0.

[0126] In one embodiment, the first, second and third complex values may
be computed according to the following expressions:

<s(n), f1(n)>, (14A)

<s(n), f2(n)>, (14B)

<s(n), f3(n)>, (14C)

where s represents the ECG signal, where f1, f2 and f3
represent the first, second and third functions respectively. The
notation <x(n),y(n)> represents the inner product given by

n = 1 N s x ( n ) y ( n ) . ( 15
) ##EQU00008##

[0127] At 450, the computer system may compute a time of the waveform
feature and/or a duration of the waveform feature based on the first,
second and third complex values and based on the times in the
neighborhood U(τ0) of the first window-displacement time
τ0. In some embodiments, the computer system may compute the
waveform feature time and the waveform feature duration by solving a
linear system Av=c for the unknown vector v, where the matrix A is
determined by the times in the neighborhood U(τ0) of the first
window-displacement time τ0, where the vector c is determined by
the first, second and third complex values.

[0128] The neighborhood U(τ0) may be an interval of the form
[τ0-ε, τ0+ε], where ε is
proportional to σ0. In one embodiment, the times in the
neighborhood U(τ0) include the times τ0, τ1
and τ-1, where τ1=τ0+Δτ and
τ-1=τ0-Δτ, where Δτ=rσ0.
In this embodiment, the matrix A and the vector c may be determined by
the expressions:

where ln(*) denotes the natural logarithm function, where complex value
z0 is the inner product corresponding to time τ0, where
complex value z1 is the inner product corresponding to time
τ1, where complex value z-1 is the inner product
corresponding to time τ-1. Thus, the solution vector v is given
by v=A-1c, where A-1, the inverse of matrix A, is given by:

[0129] As noted above, Δτ=rσ0. In one embodiment, the
parameter r equals 0.1. However, a wide variety of other values are
contemplated for the parameter r. For example, in one set of embodiments,
r may take a value in the range [0.08, 0.12]. In another set of
embodiments, r may take a value in the range [0.05, 0.2]. In yet another
set of embodiments, r may take a value in the range [0.033, 0.3].

[0130] Let x.sub.τ and b denote the first and second components of v,
respectively, i.e., v=[xf, b]T. The computer system may compute
the waveform feature time τf and the waveform feature duration
df based on the expressions:

τf=2b/xf (18A)

df=[(α0-2b)/2bα0]1/2 (18B)

[0131] In some embodiments, the computer system may utilize more than
three times in the neighborhood U(τ0). Thus, instead of a
2×2 system, the computer system may generate and solve an m×2
system, where m is greater than two. Since an m×2 system is
overdetermined (more equations than unknowns), the computer system may
compute the least squares solution v* to the system Av=c. Methods for
computing the least squares solution for an overdetermined linear system
are well known in the art.

[0132] At 460, the computer system may store the waveform feature time and
the waveform feature duration in a memory. The waveform feature time
and/or the waveform feature duration may be subsequently accessed from
the memory for further processing. For example, the waveform feature time
may be used together with one or more previous waveform feature times to
estimate a heart rate.

[0133] In some embodiments, the computer system displays the waveform
feature time (or a value derived from the waveform feature time) via a
display device. For example, the waveform feature time may be displayed
as a numeric value. As another example, the waveform feature time may be
indicated by placing a marker (e.g., an arrow or a point) on the time
axis of a displayed graph of the ECG signal. The position of the marker
on the time axis indicates the waveform feature time.

[0134] In some embodiments, the computer system also displays the waveform
feature duration via the display device. For example, the waveform
feature duration may be displayed as a numeric value. As another example,
the waveform feature duration may be indicated by highlighting (or
otherwise marking) an interval on the time axis of a displayed graph of
the ECG signal. As yet another example, the waveform feature duration may
be indicated by highlighting a portion of the waveform itself on a
displayed graph of the ECG signal.

[0135] The waveform feature may any of a variety of features that occur
within ECG signals. For example, the waveform feature may be a QRS
complex, a T wave, a P wave or a U wave. In the case where the waveform
feature is a QRS complex, the computer system may compute an onset time
and/or an offset time of the QRS complex based on the waveform feature
time and the waveform feature duration. For example, the onset time and
the offset time may be computed according the relations:

tonset=τf-kdf (19A)

toffset=τf+kdf. (19B)

[0136] The value k may be a value in the range [2.5, 5.0]. For example, in
one embodiment, k equals 4. In another embodiment k equals 3.5. In some
embodiments, the value k may depend on a current estimate of heart rate
and/or on the species of the organism under analysis. In some
embodiments, the value k may depend on a type of cardiac pathology. (For
example, a user may select the type of cardiac pathology from a list of
known types.)

[0137] In some embodiments, the plurality of STFTs are computed using
Gaussian windows. However, other window types are contemplated. For
example, in other embodiments, the STFTs may use raised cosine windows,
polynomial windows, rational function windows, trapezoidal windows,
triangular windows, etc.

[0138] In some embodiments, the windowed sinusoid functions that are used
to calculate the inner products are Gaussian-modulated complex
exponentials, e.g., members of the class K as described above. Other
types of modulation are contemplated. For example, in other embodiments,
the windowed sinusoid functions are complex exponentials that are
modulated with raised cosine windows, polynomial windows, rational
function windows, trapezoidal windows, triangular windows, etc.

[0139] In one set of embodiments, a method 500 for identifying a QRS
complex may include the following operations. See FIG. 5.

[0140] At 510, a computer system may perform a multiscale short-time
Fourier transform (STFT) on a set of samples {s(n)} to obtain a transform
array that is parameterized by window width, window displacement time
τ and frequency ω. In one embodiment, the multiscale STFT
includes three monoscale STFTs based on window widths of 0.2 sec, 0.1 sec
and 0.05 sec, respectively. However, the multiscale STFT may include
other numbers of monoscale STFTs; and other sets of window width values
may be used.

[0141] In some embodiments, the sample set {s(n)} is subjected to
filtering for baseline removal prior to performing the multiscale STFT.

[0142] The sample set {s(n)} may represent a portion of an ECG signal. The
ECG signal portion may include a number of waveform features. For
example, the waveform features may include at least one QRS complex. The
waveform features may also include other features such as one or more
instances of the following types of features: T waves, P waves and U
waves.

[0143] As noted above, the multiscale STFT may be computed by performing a
number of FFTs.

[0144] At 520, the computer system may operate on the transform array to
determine a plurality of peaks in the transform array. The process of
operating on the transform array may include determining, for each of the
plurality of peaks, a window width value, a window displacement time, a
frequency value, and a power value (or amplitude value).

[0145] In some embodiments, the process 520 of operating on the transform
array may include searching for the NP peaks (or local maxima) of
largest magnitude in the transform array. In other words, the computer
system may compute a magnitude array from the transform array (by
calculating the magnitude of each complex entry of the transform array),
and then identify the NP largest peaks in the magnitude array. As
noted above, smoothing may be applied to the magnitude array prior to
identifying the peaks.

[0146] In some embodiments, the search for peaks in the transform array
may be restricted to a band of frequencies that is smaller than the
frequency range of the multiscale STFT. For example, when the ECG signal
is a human ECG signal, the search process may be restricted to
frequencies in the band [10 Hz, 25 Hz]. In another embodiment, the search
process is restricted to the band [8 Hz, 30 Hz]. Different bands may be
used in different application contexts.

[0147] At 530, the computer system may generate, for each of the plurality
of peaks, a refined window width value and a refined window displacement
time, by: computing an inner product between the set of samples and each
of a plurality of functions. The plurality of functions may be windowed
sinusoids (a) having a common frequency equal to the frequency value of
the peak, (b) being centered at times that are in a neighborhood of the
window displacement time of the peak, and (c) having a common width that
is based on the window width value of the peak; and solving a linear
system Av=c for the unknown vector v, where the vector c is determined by
the inner products, where the matrix A is determined by the times that
are in the neighborhood of the window displacement time of the peak.

[0149] In some embodiments, the computer system may identify one of the
peaks (or local maxima) as corresponding to a QRS complex based on a
determination that the power value of the peak exceeds a threshold value.
The computer system may also require that the refined window displacement
time of the peak satisfies one or more time constraints in order to
qualify as a QRS complex.

[0150] In one embodiment, the threshold value for power is an adaptive
threshold that changes over time. For example, the threshold value may be
dynamically adjusted based on the power values computed for previous QRS
complexes in the ECG signal.

[0151] The one or more time constraints may include a constraint on the
QRS repetition interval. Thus, in order for a peak to qualify as a QRS
complex, the computer system may require that the refined window
displacement time of the peak occurs within a time interval
[tprev+TA, tprev+The value TB]. The value tprev
represents a time that has been determined for a previous QRS complex.
The value TA is the minimum time between two successive QRS
complexes. The value TB is the maximum time between two successive
QRS complexes. The values TA and TB may be determined based on
a maximum heart rate Rmax and a minimum heart rate Rmin
according to the relations:

TA=1/Rmax (20A)

TB=1/Rmin. (20B)

[0152] In some embodiments, the maximum rate Rmax and the minimum
rate Rmin may be set by a user/operator. In one embodiment, the
maximum rate and minimum rate are determined by a mode selection. The
user may be offered a choice from a number of supported modes. For
example, in one mode, appropriate for a "normal" human heart, the minimum
rate may be 50 Hz and the maximum rate may be 200 Hz.

[0153] In some embodiments, the values TA and TB may be adaptive
constants. Their values may change based on the actual repetition
intervals observed from the QRS complexes that have been previously
identified by the computer system.

[0154] In some embodiments, the one or more time constraints for QRS
identification may include a constraint on the PR interval, i.e., the
time from the P wave to the following QRS complex. Thus, in the case
where a waveform feature X of sub-threshold power (e.g., a P wave) has
been identified, the computer system may require that the refined window
displacement time corresponding to a peak be at least TPR seconds
after the time of the waveform feature X, where TPR is a minimum
value for the PR interval. In one embodiment, the computer system may
also impose a maximize value constraint on the PR interval.

[0155] In some embodiments, the one or more time constraints for QRS
identification may include a constraint on the QT interval, i.e., the
time from the QRS complex to the following T wave. Thus, in the case
where a waveform feature Y of sub-threshold power (e.g., a T wave) has
been identified, the computer system may require that the refined window
displacement time corresponding to a peak be at least TQT seconds
before the time of the waveform feature Y, where TQT is a minimum
value for the QT interval. In one embodiment, the computer system may
also impose a maximize value constraint on the QT interval.

[0156] In some embodiments, the computer system may compute a QRS onset
time and/or a QRS offset time based on the refined window displacement
time and the refined window width of the QRS peak (i.e., the peak that
has been identified as corresponding to the QRS complex). The computer
system may display the QRS onset and/or the QRS offset time via a display
device. In one embodiment, the QRS onset and QRS offset time may be
indicated by adding time markers to a displayed graph of the ECG signal.
For example, the markers may be arrows or vertical lines that indicate
the QRS onset and offset times on the displayed graph.

[0157] In some embodiments, the computer system may repeat processes 510,
520 and 530 for a series of sets of samples of the ECG signal, i.e., for
a series of sample blocks. In one embodiment, successive sample sets are
partially overlapping.

[0158] As described above, process 520 determines a plurality of peaks.
Let {Pj} denote the plurality of peaks. In some embodiments, the
computer system may compute a windowed sinusoid function hj for each
peak Pj, where the windowed sinusoid function is determined by the
refined window width value of the peak, the refined window displacement
time of the peak, and the frequency value of the peak. (For example, the
functions {hj} may be functions of the class K as described above.)
Furthermore, the computer system may generate a linear combination of the
windowed sinusoid functions {hj} according to the expression

j = 1 N P c j h j ( n ) , ( 21 )
##EQU00011##

where the coefficients {cj} of the linear combination are determined
by the power values of the corresponding peaks {Pj}. For example,
cj may be set equal to SQRT(Pj). Alternatively, the coefficient
cj may be set equal to the inner product <s,hj>. The
computer system may display a graph of real part of the linear
combination as a function of time.

[0159] FIG. 6 is a block diagram illustrating a method 600 for analyzing
an ECG signal to determine QRS onset and offset times. The method 600 may
be performed by a computer system or an interacting set of computer
systems.

[0160] Process 610 receives a block of samples of an ECG signal and
performs a coarse search for the QRS complex using a multiscale STFT. The
coarse search may be performed as variously described above. The coarse
search identifies a set of QRS complex candidates, and generates coarse
parameters for each candidate, e.g., parameters such as window width,
window displacement time (also known as delay time) and frequency.

[0161] Process 620 operates on the coarse parameters of each QRS complex
candidate to generate corresponding refined parameters for the candidate.
Thus, process 620 may be referred to herein as a "refinement process".
The refined parameters for a candidate may include a refined window width
and a refined window displacement time. The frequency ωP of a
candidate may also be interpreted as a refined parameter although its
value is not changed by the refinement process. The refinement process
may be implemented as variously described above.

[0162] Processor 630 selects the one of the candidates as the QRS complex
based on an analysis of the refined parameters and the power values (or
amplitude values) of the candidates. Process 630 may also calculate a QRS
onset time and a QRS offset time based on the refined parameters of the
QRS winner (i.e., the selected candidate). Process 630 may be implemented
as variously described above.

[0163] In some embodiments, the QRS onset time and QRS offset time from
one or more previously identified QRS complexes may be stored as state
information. Furthermore, the coarse power values (or the refined
amplitude values) of one or more previously identified QRS complexes may
be stored as part of the state information. The state information may be
used by process 630 in performing the current QRS selection.

[0164]FIG. 7 illustrates one embodiment of a computer system 700 that may
be used to perform any of the method embodiments described herein, or,
any combination of the method embodiments described herein, or any subset
of any of the method embodiments described herein, or, any combination of
such subsets.

[0165] Computer system 700 may include a processing unit 710, a system
memory 712, a set 715 of one or more storage devices, a communication bus
720, a set 725 of input devices, and a display system 730.

[0166] System memory 712 may include a set of semiconductor devices such
as RAM devices (and perhaps also a set of ROM devices).

[0167] Storage devices 715 may include any of various storage devices such
as one or more memory media and/or memory access devices. For example,
storage devices 715 may include devices such as a CD/DVD-ROM drive, a
hard disk, a magnetic disk drive, magnetic tape drives, etc.

[0168] Processing unit 710 is configured to read and execute program
instructions, e.g., program instructions stored in system memory 712
and/or on one or more of the storage devices 715. Processing unit 710 may
couple to system memory 712 through communication bus 720 (or through a
system of interconnected busses). The program instructions configure the
computer system 700 to implement a method, e.g., any of the method
embodiments described herein, or, any combination of the method
embodiments described herein, or, any subset of any of the method
embodiments described herein, or any combination of such subsets.

[0169] Processing unit 710 may include one or more processors (e.g.,
microprocessors).

[0170] One or more users may supply input to the computer system 700
through the input devices 725. Input devices 225 may include devices such
as a keyboard, a mouse, a touch-sensitive pad, a touch-sensitive screen,
a drawing pad, a track ball, a light pen, a data glove, eye orientation
and/or head orientation sensors, a microphone (or set of microphones), or
any combination thereof.

[0171] The display system 730 may include any of a wide variety of display
devices representing any of a wide variety of display technologies. For
example, the display system may be a computer monitor, a head-mounted
display, a projector system, a volumetric display, or a combination
thereof. In some embodiments, the display system may include a plurality
of display devices. In one embodiment, the display system may include a
printer and/or a plotter.

[0172] In some embodiments, the computer system 700 may include other
devices, e.g., devices such as one or more graphics accelerators, one or
more speakers, a sound card, a video camera and a video card.

[0173] The various display actions described herein may be performed using
the display system 730.

[0174] In some embodiments, computer system 700 may include one or more
communication devices 735, e.g., a network interface card for interfacing
with a computer network. In one embodiment, computer system 700 may
receive ECG signal samples from a remote computer via such a
communication device.

[0175] The computer system may be configured with a software
infrastructure including an operating system, and perhaps also, one or
more graphics APIs (such as OpenGL®, Direct3D, Java 3D®)

[0176] In some embodiments, the computer system 700 may be configured for
coupling to a data acquisition system 740. The data acquisition system
740 is configured to receive analog inputs signals, to digitize the
analog input signals, and to make those digitized signals available to
the computer system 700. For example, the data acquisition system 740 may
interface with a set of ECG sensors 745 in order to capture ECG signals
that are provided by the ECG sensors 745. The data acquisition system 740
may operate under the control of the software executing on processor 710.

[0177] In some embodiments, the computer system 700 may be configured to
interface with a specialized ECG monitor system 750, e.g., an
off-the-shelf system designed for capturing and/or monitoring ECG
signals.

[0179]FIG. 9 shows one embodiment of the possible display output. The ECG
signal (thin dark line) is captured from record 100 in MIT-BIH Arrhythmia
DB. The smooth signal (thick line) is computed based on expression (6).
Observe that the estimated onset, center and offset times of the QRS
complex are indicated with vertical lines.

[0180]FIG. 10 shows the spectrogram amplitude for a frequency-modulated
Gaussian function whose center is at (0.4 sec, 50 Hz). Gray scale is used
to indicate amplitude. Thus, the amplitude has a peak at (0.4 sec, 50
Hz).

[0181]FIG. 11 shown another embodiment of the possible display output.
The ECG signal (thin dark line) is a captured ECG signal. The smoothed
signal (thick line) is computed using the parameters of the estimated QRS
complexes. Again, observe that the onset, center and offset times of the
estimated QRS complexes are indicated with vertical lines.

[0182] Although the embodiments above have been described in considerable
detail, numerous variations and modifications will become apparent to
those skilled in the art once the above disclosure is fully appreciated.
It is intended that the following claims be interpreted to embrace all
such variations and modifications.