COMPUTER-IMPLEMENTED METHOD FOR SYNCHRONIZING A PHOTOPLETHYSMOGRAPHY (PPG) SIGNAL WITH AN ELECTROCARDIOGRAM (ECG) SIGNAL

20230157647 · 2023-05-25

    Inventors

    Cpc classification

    International classification

    Abstract

    A computer-implemented method for synchronizing a PPG signal with an ECG signal includes: recording the ECG and PPG signals semi-synchronously; cutting the PPG signal into PPG signal pieces; for a PPG signal piece: determining distances d between a vector of PPG peak times and respective vectors of ECG peak times for respective ECG signal pieces obtained by applying different offsets o; determining a best matching ECG signal piece with minimal distance do; and registering start time x of the PPG signal piece, start time yo of the best matching ECG signal piece, and the minimal distance do; determining an offset and drift between the PPG signal and ECG signal as the offset and slope of a regression model modelling the relation between the start time x and start time yo, inverse weighted by the minimal distance do; applying the offset and drift to the PPG signal.

    Claims

    1.-10. (canceled)

    11. A computer-implemented method for synchronizing a photoplethysmography signal, abbreviated PPG signal, with an electrocardiogram signal, abbreviated ECG signal, said method comprising: recording said ECG signal using an ECG monitoring system; recording said PPG signal, semi-synchronously with said recording of said ECG signal, using a contact PPG sensor; cutting said PPG signal into PPG signal pieces; for a PPG signal piece out of said PPG signal pieces: generating a vector of PPG peak times for peaks in said PPG signal piece; selecting different offsets o; cutting different ECG signal pieces out of said ECG signal by applying said different offsets o in said ECG signal; generating respective vectors of ECG peak times for said ECG signal pieces; computing distances d between said vector of PPG peak times and said respective vectors of ECG peak times; determining a best matching ECG signal piece with minimal distance do amongst said distances d; and registering a start time x of said PPG signal piece in said PPG signal, a start time yo of said best matching ECG signal piece in said ECG signal, and said minimal distance do; determining an offset between said PPG signal and ECG signal as the offset of a regression model modelling the relation between said start time x and said start time yo, inverse weighted by said minimal distance do; determining a drift between said PPG signal and ECG signal as the slope of said regression model; and applying said offset and said drift to said PPG signal to synchronize said PPG signal with said ECG signal.

    12. The computer-implemented method for synchronizing a PPG signal with an ECG signal according to claim 11, further comprising after cutting said PPG signal into PPG signal pieces: performing a quality evaluation for said PPG signal pieces to retain only PPG signal pieces with a quality above a certain quality threshold.

    13. The computer-implemented method for synchronizing a PPG signal with an ECG signal according to claim 11, wherein computing said distances d comprises: aligning a first peak detected in said PPG signal piece with a first peak detected in an ECG signal piece; matching every further peak detected in said ECG signal piece with a peak detected in said PPG signal piece by selecting the closest PPG signal peak; summing absolute time differences between pairs of matched signal peaks to obtain a distance.

    14. A computer-implemented method for synchronizing a PPG signal with an ECG signal according to claim 11, further comprising: copying annotations from said ECG signal onto said synchronized PPG signal to thereby obtain an annotated PPG signal.

    15. The computer-implemented method for synchronizing a PPG signal with an ECG signal according to claim 14, further comprising: storing said annotated PPG signal in a database used for training in machine learning.

    16. The computer-implemented method for synchronizing a PPG signal with an ECG signal according to claim 15, further comprising: training a neural network with said annotated PPG signal.

    17. The computer-implemented method for synchronizing a PPG signal with an ECG signal according to claim 14, wherein said annotations comprise one or more of the following: regular sine rhythm; insufficient quality; undefined; irregular rhythm annotations comprising: atrial fibrillation; atrial flutter; supraventricular tachycardia; ventricular tachycardia; sinus tachycardia; bradycardia; ventricular fibrillation; premature atrial contraction; and premature contraction; non-rhythm clinical annotations comprising: sleep apnea.

    18. A controller comprising at least one processor and at least one memory including computer program code, the at least one memory and computer program code being configured to, with the at least one processor, cause the controller to perform: recording said ECG signal using an ECG monitoring system; recording said PPG signal, semi-synchronously with said recording of said ECG signal, using a contact PPG sensor; cutting said PPG signal into PPG signal pieces; for a PPG signal piece out of said PPG signal pieces: generating a vector of PPG peak times for peaks in said PPG signal piece; selecting different offsets o; cutting different ECG signal pieces out of said ECG signal by applying said different offsets o in said ECG signal; generating respective vectors of ECG peak times for said ECG signal pieces; computing distances d between said vector of PPG peak times and said respective vectors of ECG peak times; determining a best matching ECG signal piece with minimal distance do amongst said distances d; and registering a start time x of said PPG signal piece in said PPG signal, a start time yo of said best matching ECG signal piece in said ECG signal, and said minimal distance do; determining an offset between said PPG signal and ECG signal as the offset of a regression model modelling the relation between said start time x and said start time yo, inverse weighted by said minimal distance do; determining a drift between said PPG signal and ECG signal as the slope of said regression model; and applying said offset and said drift to said PPG signal to synchronize said PPG signal with said ECG signal.

    19. A computer readable storage medium comprising computer-executable instructions of a program for performing the following steps when the program is run on a computer: recording said ECG signal using an ECG monitoring system; recording said PPG signal, semi-synchronously with said recording of said ECG signal, using a contact PPG sensor; cutting said PPG signal into PPG signal pieces; for a PPG signal piece out of said PPG signal pieces: generating a vector of PPG peak times for peaks in said PPG signal piece; selecting different offsets o; cutting different ECG signal pieces out of said ECG signal by applying said different offsets o in said ECG signal; generating respective vectors of ECG peak times for said ECG signal pieces; computing distances d between said vector of PPG peak times and said respective vectors of ECG peak times; determining a best matching ECG signal piece with minimal distance do amongst said distances d; and registering a start time x of said PPG signal piece in said PPG signal, a start time yo of said best matching ECG signal piece in said ECG signal, and said minimal distance do; determining an offset between said PPG signal and ECG signal as the offset of a regression model modelling the relation between said start time x and said start time yo, inverse weighted by said minimal distance do; determining a drift between said PPG signal and ECG signal as the slope of said regression model; and applying said offset and said drift to said PPG signal to synchronize said PPG signal with said ECG signal.

    Description

    BRIEF DESCRIPTION OF THE DRAWINGS

    [0121] FIG. 1 is a flow scheme illustrating an embodiment of the method for synchronizing an ECG signal and PPG signal according to the present invention;

    [0122] FIG. 2 is a flow scheme illustrating in more detail the step 104 of determining a best-matching ECG signal piece for a PPG signal piece in an embodiment of the method for synchronizing an ECG signal and PPG signal according to the present invention;

    [0123] FIG. 3 shows a PPG signal piece and the best matching ECG signal piece determined by minimizing the distance between peak time vectors in step 104 of an embodiment of the method for synchronizing an ECG signal and PPG signal according to the present invention;

    [0124] FIG. 4 is a graph showing the result of steps 105-106 of registering best matches between ECG signal pieces and PPG signal pieces, and modelling the relation between ECG time and PPG time to determine offset and drift in an embodiment of the method for synchronizing an ECG signal and PPG signal according to the present invention; and

    [0125] FIG. 5 illustrates a suitable computing system 500 for realizing embodiments of the method for synchronizing an ECG signal and PPG signal according to the present invention.

    DETAILED DESCRIPTION OF EMBODIMENT(S)

    [0126] FIG. 1 shows the steps 101-107 executed in an embodiment of the method for synchronizing an ECG signal and PPG signal according to the present invention.

    [0127] In steps 101 and 102, an ECG signal and a PPG signal are recorded semi-synchronously using different devices on a single person or animal. In step 101, the ECG signal is obtained by an ECG monitoring system, for example a Holter monitoring system. In step 102, the PPG signal is obtained by a PPG sensor, for example a pulse oximeter or smart device with camera, like for instance a smart wristband or smartwatch. Typically, the ECG signal recording in step 101 starts first and the PPG signal recording in step 102 starts a few minutes later. Obviously, the recordings may start in reverse order, i.e. PPG first and then ECG.

    [0128] In step 103, the recorded PPG signal is cut into pieces. The pieces have a predetermined length. The predetermined length may be a fixed length in time, for example PPG signal pieces of 15 seconds each. Alternatively, the PPG signal pieces may have a predetermined length expressed as an amount of cardiac beats, for example 20 beats. In the latter example, different PPG signal pieces will have a varying duration in time. The PPG signal pieces cut out of the recorded PPG signal may be consecutive signal pieces, i.e. the next PPG signal piece starts where the previous PPG signal piece stops. Alternatively, the PPG signal pieces may be overlapping signal pieces, or they may be separated in time with start times selected randomly, pseudo-randomly, or algorithm-based. The amount of PPG signal pieces cut out of the recorded PPG signal must be high enough to enable regression modelling. This means that at least 10, but preferably a few tens or even a few hundreds of PPG signal pieces must be cut out of the recorded PPG signal.

    [0129] Optionally, not shown in FIG. 1, for each PPG signal piece cut out of the recorded PPG signal a quality evaluation is performed. The quality evaluation allows to remove PPG signal pieces that are corrupted or of insufficient quality, for instance as a result of motion, bad positioning of the skin with respect to the light sensor, ambient light interference, PPG waveform inversion, etc. A possible technique to evaluate the quality of PPG signal pieces relies on Wavelet transformation and a neural network analysis. The wavelet transformed PPG signal piece is then fed into a neural network that has been trained with sets of training data to distinguish for instance good quality PPG signals, bad quality PPG signals, and inverted PPG signals. The skilled person however shall appreciate that the method according to the present invention is not limited to a particular technique for quality assessment of PPG signal pieces. The method according to the invention could even be executed without quality assessment of the PPG signal pieces. Quality assessment however brings the advantage that only PPG pieces with little or no corruption are retained for the further steps in synchronizing the PPG signal with the ECG signal, thus resulting in a more accurate synchronization.

    [0130] In step 104, for each PPG signal piece (or for each retained PPG signal piece in case an upfront quality assessment has been executed), a best matching synchronization with an ECG signal piece is determined. One possible way to determine the best matching ECG signal piece, i.e. one possible implementation of step 104, is illustrated by FIG. 2. When starting this possible implementation as is indicated by 140 in FIG. 2, a peak time vector is generated is generated for the PPG signal piece in step 141. If it is assumed for instance that signal piece 300 drawn in FIG. 3 is cut out of a recorded PPG signal, an algorithm that detects peaks or local maxima in the PPG signal piece 300 shall detect 25 PPG beats and output [301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315] as PPG peak time vector. Herein, each of the values 301-315 corresponds to the time value of a detected local maximum in the PPG time base, i.e. the time base used by the PPG sensor that records the PPG signal in step 102. The best matching ECG signal piece is then determined by iteratively testing in steps 142-146 different offsets o and selecting the optimal offset o.sub.o which has the minimal distance between two vectors: a vector with ECG peak times (which evidently varies with the tested offset o) and the PPG peak time vector [301, . . . , 315] which is constant for the considered PPG signal piece 300. In step 142, an offset value o is selected. In step 143, an ECG signal piece is cut out of the ECG signal recorded in step 101. The ECG signal piece has a start time in the recorded ECG signal that corresponds to the selected offset o, and it has a length corresponding to the predetermined length of the PPG signal piece under consideration, for instance expressed as a length in time or as an amount of beats. In step 144, an ECG peak time vector is generated for the ECG signal piece cut out of the recorded ECG signal using offset o. If for instance offset o results in ECG signal piece 350 drawn in FIG. 3 being cut out of the ECG signal, then a peak detection algorithm that detects local maxima in the ECG signal piece 350 shall output [351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365] as peak time vector for the ECG signal piece 350. Herein, the values 351-365 represent time values of local maxima in the ECG time base, i.e. the time base used by the ECG monitoring system. In step 145, the distance d is determined between the PPG peak time vector [301, . . . , 315] and the ECG peak time vector [351, . . . , 365]. This distance d between the ECG and PPG peak sequences is for example computed by aligning the first peak of the PPG signal piece 300 with the first peak of the ECG signal piece 350, and then matching every remaining peak of the ECG signal to a peak of the PPG signal piece by taking the closest PPG peak in time. Thus, tuples of peak times are generated each consisting of the peak time of an ECG peak and the closest peak time of a PPG peak. Each peak can only be matched once, and only with its direct neighbours. Lone peaks (both in ECG signal and PPG signal), like for instance the PPG peaks at times 304, 308, 312 and 325 are not considered in the total distance. The total distance d between the PPG peak time vector [301, . . . , 315] and the ECG peak time vector [351, . . . , 365] is determined as the sum of the absolute time differences between all pairs of matching ECG-PPG peaks. In step 146, the calculated distance d for offset o is compared with the smallest distance d.sub.o calculated so far for the considered PPG signal piece. If the calculated distance d is smaller than d.sub.o, the value of d.sub.o will be replaced with the value of d, and the corresponding start time y.sub.o of the ECG signal piece that represents the best match with the considered PPG signal piece so far (the start time y.sub.o corresponding to the selected offset o) shall be recorded. The steps 142-146 shall be repeated thereafter for a newly selected offset value o. The steps 142-146 can be repeated until the smallest distance d.sub.o is below a predetermined threshold, or it these steps can be repeated a predetermined amount of times for a predetermined amount of offset values o ranging from −o.sub.m to o.sub.m (o.sub.m being the absolute value of a maximal allowed offset).

    [0131] Summarizing, the measured PPG signal is cut into pieces of for instance 15 seconds. For each PPG signal piece located at x seconds in the PPG signal measurement, the best synchronization with an ECG signal piece located at y.sub.o=x+o.sub.o is searched for, with o.sub.o being the optimal offset and for example −o.sub.m<=o.sub.o<=o.sub.m (o.sub.m being the absolute value of a maximal allowed offset). The best synchronization is determined by testing different offsets o and selecting the offset o.sub.o which has the minimal distance between two vectors, one vector with ECG peaks (which varies with the offset o and thus with the location y) and one vector with PPG peaks (which remains constant at location x). The minimal distance obtained this way is named d.sub.o and the corresponding start time of the best matching ECG signal piece is named y.sub.o.

    [0132] For the best matching ECG signal piece, the start time x of the PPG signal piece, the start time y.sub.o of the ECG signal piece, and the minimal distance d.sub.o are registered in step 105, as shown both in FIG. 1 and FIG. 2.

    [0133] In step 106, regression modelling is applied on the best matching tuples (x, y.sub.o) with x representing the start time of PPG signal pieces and y.sub.o representing the start time of the best matching ECG signal pieces. FIG. 4 for instance illustrates the result of a linear model obtained through linear regression on 11 best matching tuples represented by 401, 402, 403, 404, 405, 406, 407, 408, 409, 410 and 411. The linear regression is applied with weights 1/d.sub.o such that best matching tuples with higher minimal distance do between PPG and ECG peak time vectors get a lower weight in the linear model 400. The so obtained linear model 400 allows to determine in step 161 the offset between the ECG signal and PPG signal, and in step 162 the drift between the ECG time base and PPG time base. The offset is determined as the coordinate value on the ECG time axes of the point of the linear model 400 whose PPG time=0. The drift is determined as the slope of the linear model 400. When applying the so obtained offset and drift to the ECG signal in step 107, the ECG signal and PPG signal are aligned with high accuracy and will remain synchronized over time, even if the ECG and PPG recordings last for hours.

    [0134] Summarizing, weighted linear regression on the best matching tuples (x, y.sub.o) with weights d.sub.o results in a linear model y=m.Math.x+b, with x being the PPG time (in seconds) as determined by the PPG measurement device and y being the ECG time (in seconds) as determined by the ECG monitoring system. Herein, m determines the optimal drift between ECG and PPG time, and b determines the optimal offset between ECG and PPG signal recordings for the whole measurement.

    [0135] Using the offset and drift obtained through embodiments of the method according to the invention results in performant synchronization when applied to long (many hours) simultaneously recorded ECG-PPG measurements. The method takes benefit of features (the interval between peaks) that are common to both the ECG and PPG signals for determining best matches. There is no need to remove outliers. An algorithm like RANSAC isn't necessary because weighted regression is done based on the minimum distance of matching vectors and the regression may use the 11 norm which is more robust than the usual 12 norm. The main advantage thereof is that less parameters need to be tuned (RANSAC has two parameters that need tuning).

    [0136] FIG. 5 shows a suitable computing system 500 according to an embodiment of the invention. Computing system 500 is suitable for implementing embodiments of the method for synchronizing a PPG signal with an ECG signal in line with the present invention. Computing system 500 may in general be formed as a suitable general-purpose computer and comprise a bus 510, a processor 502, a local memory 504, one or more optional input interfaces 514, one or more optional output interfaces 516, a communication interface 512, a storage element interface 506 and one or more storage element 508. Bus 510 may comprise one or more conductors that permit communication among the components of the computing system 500. Processor 502 may include any type of conventional processor or microprocessor that interprets and executes programming instructions. Local memory 504 may include a random access memory (RAM) or another type of dynamic storage device that stores information and instructions for execution by processor 502 and/or a read only memory (ROM) or another type of static storage device that stores static information and instructions for use by processor 502. Input interface 514 may comprise one or more conventional mechanism that permit an operator or user to input information to the computing device 500, such as a keyboard 520, a mouse 530, a pen, voice recognition and/or biometric mechanisms, a camera, etc. Output interface 516 may comprise one or more conventional mechanisms that output information to the operator or user, such as a display 540, etc. Communication interface 512 may comprise any transceiver-like mechanism such as for example one or more Ethernet interfaces that enables computing system 500 to communicate with other devices and/or systems, for example with other computing devices 581, 582, 583. The communication interface 512 of computing system 500 may be connected to such another computing system by means of a local area network (LAN) or a wide area network (WAN) such as for example the internet. Storage element interface 506 may comprise a storage interface such as for example a Serial Advanced Technology Attachment (SATA) interface or a Small Computer System Interface (SCSI) for connecting bus 510 to one or more storage elements 508, such as one or more local disks, for example SATA disk drives, and control the reading and writing of data to and/or from these storage elements 508. Although the storage elements 508 above is described as a local disk, in general any other suitable computer-readable media such as a removable magnetic disk, optical storage media such as a CD or DVD, -ROM disk, solid state drives, flash memory cards, . . . could be used. It is noticed that the entire method according to the present invention can be executed centralized, e.g. on a server in a management centre or in a cloud system, or it can be partially executed on a remote electronic device, e.g. worn by the user, and partially on a central server. Computing system 500 could thus correspond to the processing system available centrally or the processing system available in the electronic device.

    [0137] Although the present invention has been illustrated by reference to specific embodiments, it will be apparent to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied with various changes and modifications without departing from the scope thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. In other words, it is contemplated to cover any and all modifications, variations or equivalents that fall within the scope of the basic underlying principles and whose essential attributes are claimed in this patent application. It will furthermore be understood by the reader of this patent application that the words “comprising” or “comprise” do not exclude other elements or steps, that the words “a” or “an” do not exclude a plurality, and that a single element, such as a computer system, a processor, or another integrated unit may fulfil the functions of several means recited in the claims. Any reference signs in the claims shall not be construed as limiting the respective claims concerned. The terms “first”, “second”, third”, “a”, “b”, “c”, and the like, when used in the description or in the claims are introduced to distinguish between similar elements or steps and are not necessarily describing a sequential or chronological order. Similarly, the terms “top”, “bottom”, “over”, “under”, and the like are introduced for descriptive purposes and not necessarily to denote relative positions. It is to be understood that the terms so used are interchangeable under appropriate circumstances and embodiments of the invention are capable of operating according to the present invention in other sequences, or in orientations different from the one(s) described or illustrated above.