METHOD FOR RECONSTRUCTING AN ECG IN REAL TIME FROM A PPG SIGNAL
The method segments PPG signals into predefined windows and synchronizes with ECG signals to reconstruct a continuous ECG using a CNN with U-NET architecture, addressing inaccuracies in existing methods and enhancing diagnostic accuracy.
Patent Information
- Application Number
- FR2023014653
- Authority / Receiving Office
- FR · FR
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2023-12-20
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2043-12-20
AI Technical Summary
Existing methods for reconstructing an electrocardiogram (ECG) from a photoplethysmogram (PPG) signal using machine learning algorithms suffer from inaccuracies in reproducing QRS complexes and heart rate variability, leading to unsatisfactory diagnostic assistance for cardiac pathologies.
A method involving a machine learning model that segments PPG signals into predefined time windows, using fewer than two cycles, and employs markers like R peaks for interpolation, synchronized with ECG signals to reconstruct a continuous ECG signal, utilizing a convolutional neural network (CNN) with U-NET architecture and Attention Gate for precise heart rate alignment.
The method achieves reliable and accurate reconstruction of ECG signals, minimizing errors in QRS complex segmentation and heart rate variability, enabling improved diagnostic capabilities.
Smart Images

Figure 00000027_0000 
Figure 00000027_0001 
Figure 00000028_0000
Abstract
Description
Title of the invention: METHOD FOR RECONSTRUCTING AN ECG IN REAL TIME FROM A PPG SIGNAL Scope of the invention
[0001] The field of the invention relates to the field of methods and devices for transforming, analyzing, and processing cardiac signals. In particular, the field of the invention relates to the field of methods for transforming a photoplethysmography signal, known as a PPG signal, into an electrocardiographic signal, known as an ECG signal, in order to produce a continuous ECG signal from a simple acquisition device. State of the art
[0002] Currently, there are solutions for obtaining an electrocardiograph from a photoplethysmogram.
[0003] ECG has technical implementation disadvantages unlike PPG. To perform an ECG, multiple electrodes are required, unlike a single sensor for PPG, which allows for continuous recording. Furthermore, the material used to provide a high-quality ECG signal with the electrode can cause skin irritation, discomfort, or even allergic reactions with long-term use of these devices.
[0004] Certain factors such as electrode positioning, detachment or retention on the skin can influence ECG results and lead to false positive or negative results.
[0005] In the prior art, there are methods for reconstructing an ECG signal from a PPG signal using a machine learning algorithm. In this type of method, a fixed-length segmentation of the PPG signal with several epochs is used.
[0006] One problem is that an ECG signal contains numerous signal descriptors, namely data characterizing the QRS complex and heart rate data, as well as variations in this rate over time. Learning does not allow for reliable reproduction of both the QRS complex and heart rate variability.
[0007] Consequently, the accuracy of predictions from current models remains unsatisfactory for exploiting the ECG signal reconstructed from a PPG signal, particularly for providing assistance in the diagnosis of cardiac pathologies.
[0008] There is a need to improve the accuracy of the reconstruction of an ECG signal from a PPG signal in order to obtain a continuous signal and generate indicators characterizing singularities of the ECG signal thus reconstructed. Summary of the invention
[0009] One objective of the invention is to overcome the aforementioned disadvantages.
[0010] According to a first aspect, the invention relates to a method for generating an ECG signal from a PPG signal and a trained machine learning model comprising: • A first acquisition of a first signal, called PPG signal, by means of a sensor arranged on a signal acquisition device in contact with the skin of an individual to measure the variations in the pulsatile volume of blood; • Sampling of the first signal at a predefined frequency; • A recording of the heart rhythm; • Segmentation of the first signal comprising: • Definition of an initial time window with a predefined initial duration; • Extraction of a first set of sampled points from the first PPG signal, called PPG points, comprising a first subset of points between two consecutive PPG markers and a second subset of consecutive points from the second PPG marker, the number of points in the second subset being less than the number of bridges in the first subset; • Positioning of said first segmented signal in the first time window from the second PPG marker; • Use of a trained learning model to produce an output vector defining a second segmented ECG signal from an input vector containing the data from the first set; • Recombination of the generated segments to reconstruct a continuous ECG signal from: • Detection of at least two consecutive ECG markers of the second signal present in each cycle of said second signal; • Reconstruction of the ECG signal by concatenation of segments from temporal markers.
[0011] One advantage of using a time window with fewer than two cycles is to obtain a reliable and accurate method for reconstructing QRS complexes. The learning performance is very good and the reconstruction is of higher quality than when using a plurality of cycles as input to the network.
[0012] According to one embodiment, heart rate is used to identify the local maximum corresponding to the ECG marker sought.
[0013] According to one embodiment, the ECG markers used during segment recombination are R peaks. An advantage is to minimize the error during cycle segmentation.
[0014] According to one embodiment, two consecutive markers of the first signal are used to interpolate the lengths between two consecutive ECG markers of the second signal.
[0015] According to one embodiment, the machine learning model is trained according to the method for training a neural network to generate an ECG from a PPG signal according to the invention.
[0016] According to another aspect, the invention relates to a method for training a neural network to generate an ECG from a PPG signal, said method comprising: • A first acquisition of a first signal, called PPG signal, by means of a sensor arranged on a signal acquisition device in contact with the skin of an individual to measure the variations in the pulsatile volume of blood; • A second acquisition of a second signal, called an ECG signal, using at least one pair of electrodes placed on the skin of an individual; • Sampling of the first signal and the second signal, each at a predefined frequency; • A heart rate recording; • Synchronization of the first signal with the second signal, said synchronization comprising: • Detection of at least one first PPG marker of the first signal present in each cycle of said first signal; • Detection of at least one first ECG marker of the second signal present in each cycle of said second signal; • Estimation of the transit time of the first PPG signal; • Alignment of the two signals based on an offset of one of the two signals by the value of the transit time; • Segmentation of the first and second signals, including: • Definition of an initial time window with a predefined initial duration; • Extraction of a first set of sampled points from the first PPG signal, called PPG points, comprising a first subset of points between two consecutive PPG markers and a second subset of consecutive points from the second PPG marker; • Positioning of said first segmented signal in the first time window, said window containing the two consecutive PPG markers; • Definition of a second time window with a second predefined duration; • Extraction of a second set of sampled points from the second ECG signal, called ECG points, comprising a first subset of points between two consecutive ECG markers and a second subset of consecutive points from a second marker; • Positioning of said second segmented signal in the first time window, said window containing the two consecutive ECG markers; • Learning a machine learning model that includes: • Generation of input vectors including the first set of points; • Implementation of a loss function from the second set of points; • Generation of a trained machine learning model.
[0017] According to one embodiment, the first marker is an R peak of a QRS complex and the second marker is a local minimum of the second signal.
[0018] According to one embodiment, the transit time is estimated by calculating the minimum difference measured between two markers of each of the two signals considered in the same cycle. One advantage is that it allows for homogeneous synchronization of the PPG and ECG signals with each other for each cycle.
[0019] According to one embodiment, the second subset of points of the second consecutive segmented ECG signal of a second marker comprises a number of points less than the number of points in the first subset.
[0020] One advantage is that it allows for precise recalibration of the network output to the heart rate. In particular, by selecting a marker that defines a local minimum or a local maximum, the second set of points makes it possible to better detect these minima or maxima at the network output and thus to group the segments together according to the heart rate.
[0021] According to one embodiment, a third subset of points from the second set of points comprises a set of ECG points of the same value following the second subset of points so as to complete the second time window. One advantage is that it allows for fixed-size training windows, considering a signal that can last up to a predefined duration. One advantage of the filling is to avoid disrupting learning with QRS complex data from a cycle other than the cycle defining the network input.
[0022] According to one embodiment, heart rate acquisition is performed by means of analyzing the second ECG signal, which includes estimating the intervals between two consecutive peaks of the acquired ECG signal, referred to as RR intervals. One advantage is obtaining a precise heart rate.
[0023] According to one embodiment, the method includes a difference indicator for the heart rate calculated from the PPG signal and that calculated from the ECG signal. One advantage is that it takes into account the deviation between the two measurements during training.
[0024] The following characteristics apply both to the method for generating an ECG signal from a PPG signal and a trained machine learning model and to the method for training the machine learning model.
[0025] According to an embodiment of one or both of these methods, the second subset of points from the first segmented PPG signal, consecutive to a second marker, comprises fewer points than the first subset. One advantage is that it allows for precise registration at the output of the network to the heart rate. In particular, by selecting a marker that defines a local minimum or a local maximum, the second set of points makes it possible to better detect these minima or maxima at the output of the network and thus to group the segments together according to the heart rate.
[0026] According to one embodiment of one or both of these methods, a third subset of points from the first set of points comprises a set of PPG points of the same value following the second subset of points so as to complete the first time window. One advantage is that it allows for fixed-size training windows by considering a signal that can last up to a predefined duration. Another benefit of this filling is that it avoids disrupting the training process with QRS complex data from a cycle other than the cycle defining the network input.
[0027] According to one embodiment of one and / or the other of these processes, the machine learning model is a convolutional neural network called a CNN.
[0028] According to an embodiment of one and / or the other of these processes, the CNN neural network is a U-NET type network composed of an encoder, a decoder and a tool allowing the neural network to focus on the most important or relevant parts of the data, a tool called Attention Gate.
[0029] According to one embodiment of one and / or the other of these processes, the training of the coefficients of the machine learning model is carried out from an optimizer and an implementation of a cost function.
[0030] According to one embodiment of one or both of these methods, heart rate acquisition is performed by analyzing the first PPG signal, which includes estimating the intervals between two consecutive markers of the acquired PPG signal. An advantage is obtaining the heart rate directly from the PPG sensor and a computer.
[0031] According to another aspect, the invention relates to a device for generating a continuous ECG signal comprising a PPG signal sensor and a calculator and memory for implementing the method of the invention. An advantage is that it allows such a device to be placed on a bracelet with a single point of contact on the wrist. Brief description of the figures
[0032] Other features and advantages of the invention will become apparent from the following detailed description, with reference to the accompanying figures, which illustrate: • [Fig. 1]: A flowchart of a pretreatment and training system of a machine learning model from two acquired signals, one an ECG signal and the other a PPG signal; • [Fig.2]: A flowchart of a neural network training; • [Fig. 3]: A flowchart of the operation of the trained neural network detailed from [Fig.2]; • [Fig. 4]: A flowchart of the neural network operation trained;
[0033] [Fig.5]: A flowchart of the pretreatment and network training system neurons; • [Fig.6]: An example of a PPG signal acquired by a measuring device; • [Fig.7]: The example of the PPG signal sampled at 100Hz after filtering; • [Fig.8]: An example of a raw ECG signal acquired by electrodes; • [Fig.9]: Example of ECG signal sampled at 100Hz after filtering; • [Fig. 10]: An example of filtered PPG and ECG signals aligned with the peaks R of the ECG signal and the corresponding minima of the PPG signal; • [Fig. 11]: An example of PPG signal segmentation over a window comprising a portion of a subsequent cycle and a filling; • [Fig. 12]: An example of ECG signal segmentation over a window comprising a portion of a subsequent cycle and a filling; • [Fig. 13]: An example of segmentation with a fixed window of two seconds of the ECG signal; • [Fig. 14]: An example of segmentation with a fixed window of two seconds of the filtered PPG signal; • [Fig. 15]: An example of neural architecture of a machine learning algorithm model for the automatic reconstruction of an ECG; • [Fig. 16]: an example of representation of the output signals of the driven network with a first type of segmentation; • [Fig. 17]: an example of representation of the output signals of the driven network with a second type of segmentation; • [Fig. 18]: an example of the representation of signals recombined by the process of the invention. Detailed description
[0034] According to a first aspect, the invention relates to a method for generating an ECG signal from a PPG signal and a machine learning MLI model. This method is described, for example, in Figures 3 and 4.
[0035] According to a second aspect, the invention relates to a method for training a machine learning PML model from the acquisition of an ECG signal and the acquisition of a PPG signal. This method implements a cost function to learn the model. This method is described, for example, in Figures 1 and 2. Acquisition of the PPG signal
[0036] The method for generating an ECG signal comprises a first ACQi acquisition step of a PPG signal, denoted Sp signal
[0037] The acquisition can be carried out from different devices. For example, the device can be a bracelet or a watch comprising at least a PPG sensor.
[0038] According to one embodiment, the PPG sensor comprises an emitter of a light source, such as a diode, and a receiver such as a photodetector.
[0039] The optical measurement technique for generating a PPG signal and deducing the heart rate from it may be known as "optical heart rate monitoring" or "OHR / OHRM". The acronym PPG may sometimes be used to refer to the technology, the signal, or the equipment. In the following description, a signal produced by this technology will be referred to as a PPG signal, and equipment such as a sensor will be referred to as a PPG sensor.
[0040] Photoplethysmography, or PPG, is a non-invasive, optical method for analyzing changes in blood volume in superficial tissues. This method relies on analyzing changes in light absorption within the tissues. It is used, for example, in pulse oximeters to measure blood oxygen saturation, and in smartwatches and fitness trackers to calculate heart rate.
[0041] According to one embodiment, the PPG sensor is an optoelectronic sensor. It consists of a light source emitter, such as a diode, and a receiver such as a photodetector. The diode emits light that passes through successive layers of the skin: the surface, the stratum corneum, the epidermis, and the dermis. Part of the light is absorbed by the blood, and part is reflected. The photodetector receives the reflected light.
[0042] According to one embodiment the transmitter and receiver are placed next to each other, called reflection mode.
[0043] According to one embodiment, the photoreceptor detects variations in reflected light and converts them into an electrical signal.
[0044] A cardiac cycle can be divided into two phases based on blood flow. When the heart contracts, it pumps blood into the vascular system; this is the systole phase. This results in an increase in blood volume within the vessels. The diastole phase is the dilation phase of the heart. This phase results in a decrease in blood volume within the vessels. During systole, the increase in blood volume leads to an increase in the amount of light absorbed by the blood and a decrease in the intensity of transmitted light. During diastole, the decrease in blood volume leads to an increase in the intensity of transmitted light. Thus, the signal acquired by the sensor includes a variation of a physical parameter measured during this cyclical phenomenon.
[0045] In one embodiment, the PPG signal, denoted Si, is a signal whose amplitude is expressed in volts or in an arbitrary unit as a function of time. In one embodiment, the heart rate can be deduced from the signal Si. In another embodiment, a computer configured to detect characteristic markers of the PPG signal allows the heart rate to be deduced.
[0046] In an illustrative example, with reference to [Fig.6], we obtain the graphical representation of a raw PPG signal denoted Si sampled at 100Hz after its acquisition by a device. ECG Acquisition
[0047] During the learning phase and the implementation of the training process, the process acquires an ECG signal and a PPG signal in order to train the MLI machine learning model. The ECG signal is denoted S2 and the PPG signal is denoted Si.
[0048] In this latter case, according to one embodiment, an ECG signal is acquired from an individual whose PPG signal is also acquired. In order to achieve effective training, the ECG and PPG signals used to train the PLI model are synchronized and acquired from the same individual. One advantage is training the model with correlated PPG and ECG signals.
[0049] According to one embodiment, during ECG acquisition, the individual is at rest. According to another embodiment, the acquisition of the ECG signal is carried out during An effort. According to one embodiment, ECG signals are acquired in different configurations corresponding to different states of an individual. One advantage is to obtain the most comprehensive possible training of all the individual's cardiac activity states.
[0050] According to one example, the acquisition is carried out during an exercise test for the generation of an exercise electrocardiogram. In this context, the individual performs increasingly intense physical exertion.
[0051] According to one embodiment, the acquisition of the ECG signal comprises the implementation of an arrangement of ten adhesive electrodes connected to an electrocardiograph by means of cables. For a more precise measurement, twelve or eighteen electrodes may be used.
[0052] The four electrodes, referred to as peripheral electrodes, are distributed at the level of each wrist and ankle. At least six electrodes, referred to as precordial electrodes, are distributed in the region of the thorax located in front of the heart, referred to as the precordial zone.
[0053] According to a simpler method, two electrodes are used to obtain at least a potential difference.
[0054] According to one embodiment, the electrodes are glued onto the bare skin.
[0055] An electrocardiogram, or ECG, is a method for visualizing the variations in electrical current flowing through the heart over time. This method relies on recording and transcribing the electrical currents passing through the heart during each cardiac contraction. The ECG provides information on the rhythm, rate, and conduction of the heart. It allows for the analysis of electrical signals generated and conducted by the heart muscle, or the analysis of blood circulation.
[0056] An electrical current from the heart originates at a precise point located at the top of the right atrium, a point called the sinoatrial node. The generated current propagates throughout the heart. As the current passes through the atria, it causes the heart muscle to contract. The conduction system maintains the heart rhythm within a specific range of values. Electrical propagation can be disrupted due to cardiac pathology.
[0057] According to one embodiment, the electrical current generated at the sinoatrial node is measured between two points on the surface of the body using electrodes and is captured by the electrocardiograph.
[0058] According to one embodiment, the signal obtained is the ECG S2 signal, which is a signal whose amplitude is expressed in Volts as a function of time.
[0059] In an illustrative example, with reference to [Fig.8], we obtain the graphic representation of a raw ECG signal sampled at 100Hz after acquisition by an electrocardiograph.
[0060] The method for generating an ECG signal includes a step of recording the heart rate. This heart rate can be deduced from the ECG signal S2.
[0061] According to another embodiment, a calculator configured to detect characteristic markers of the ECG signal allows the heart rate to be deduced.
[0062] According to one embodiment, the heart rates are deduced from the two signals Si and S2. In the latter case, the measurement of the two heart rates from the two signals makes it possible to perform measurement error corrections on one or the other of the signals.
[0063] Preferably, the heart rate is deduced from the PPG signal. An advantage is to train the MLI model under the operating conditions of the method of the invention in which the ECG is not acquired since the aim is to regenerate it from the PPG signal. Filtering
[0064] The method for training the PML model includes a filtering and sampling step of the PPG signal and the ECG signal S2, each at a predefined frequency.
[0065] According to one embodiment, the filtering and sampling steps performed during the execution of the training process are identical to those performed during the execution of the process to generate an ECG signal. In this case, the filtering and sampling steps are performed only on the PPG Siacquis signal.
[0066] According to one embodiment, the PPG signal is filtered. The use of a bandpass filter between 40 and 400 Hz to filter the high and low frequencies eliminates artifacts related to the individual's movement. The PPG signal filtering step is denoted FILTi in [Fig. 1]. The PPG signal sampling step is denoted ECHi in [Fig. 1].
[0067] In an illustrative example, with reference to [Fig.7], the raw PPG signal sampled at 100Hz from [Fig.6] is filtered and resampled to 125 Hz.
[0068] The filtered Si signal also noted SiF of [Fig.7] represents a signal in which the baseline is made stable over time.
[0069] According to one embodiment, the ECG signal is filtered using a method known as the "Tarvainen" method to reduce the shape effect. Indeed, during ECG recording, certain phenomena such as movement of the individual, electrode detachment, induced effects of respiration, variations in skin impedance, etc., can lead to an overall wave-like tendency affecting the electrical signal produced by the heart. This phenomenon is also known as baseline drift. The baseline or isoelectric line of the The core corresponds to the plot of the average signal amplitude smoothed over a given period of time.
[0070] This filtering is based on the use of a high-pass filter. In the case of the so-called "Tarvainen" method, finite impulse response (FIR) filters are used. This means that the filter output only reacts for a finite time after the application of an input impulse. This is a so-called "detrending" method. Detrending a signal consists of eliminating or reducing an underlying trend in the collected data, the trend corresponding to variations in the average signal other than those generated by the cardiac electrical activity measured over time.
[0071] In an illustrative example, with reference to [Fig. 9], the ECG signal sampled at 100 Hz from [Fig. 8] is filtered to eliminate the "trend" phenomenon. It is verified that this filtering normalizes the average value of the signal over time, reducing or even eliminating its variations over time. The ECG signal filtering step is denoted FILT2 in [Fig. 1]. The ECG signal sampling step is denoted ECH2 in [Fig. 1]. Preferably, the sampling of signal S1 will be chosen to be identical to the sampling of signal S2.
[0072] According to other embodiments, other types of filtering can be implemented such as electromyogram filtering, interference noise filtering at a certain predefined frequency.
[0073] The signals Si F and S2 F are then stored in memory for processing to train the MLI model. This processing may involve shaping the model's input vector, data enrichment, or data checking. Indeed, some signals may be eliminated when their quality is insufficient to properly train the MLI model. The signal recording step is denoted ENRi in [Fig. 1]. Synchronization - Alignment
[0074] During the training of the MLB model, the acquisition of PPG and ECG signals is performed simultaneously; consequently, the context for acquiring an ECG signal is the same as for acquiring a PPG signal. By context, we mean the data of days, times, dates, individual, physical state of the individual, etc.
[0075] When the PWM model is trained and a first ACQ1 acquisition of a PPG signal is performed concurrently with a second ACQ2 acquisition of an ECG signal, according to one embodiment, the method for generating an ECG signal includes a step of synchronizing the filtered ECG signal and the filtered PPG signal. This step is denoted SYNCi in [Fig. 1]. This step is also called signal alignment.
[0076] This step has the advantage of improving the learning of the MLI machine learning model because the lags and variations of these lags during The passage of time does not affect the training of the neural network. This synchronization effectively eliminates the longer transit times of the PPG signal relative to the ECG signal, given the nature of the signals and the body conducting them.
[0077] This synchronization phase is no longer performed during the exploitation phase of the trained neural network, since only the PPG signal will be acquired.
[0078] The graphical representation of an ECG signal groups together a set of waves that can be broken down as follows: • The P wave represents the contraction of the cardiac atria • The complex known as the "QRS" complex corresponds to mechanical systole, in other words, ventricular contraction. It contains three waves: the Q wave is the first negative deflection, the R wave is the first positive deflection, and the S wave is the second negative deflection following the R wave. • The T wave represents the so-called repolarization phase of the ventricles, in other words the return to the resting phase of the ventricles.
[0079] The peaks of each corresponding wave are designated Q, R, and S. Figure 14 shows an example of an S2 signal exhibiting a QRS complex in which the P, R, and T waves are represented.
[0080] The graphical representation of a PPG signal groups together a set of waves that can be broken down as follows: • The systolic wave which reaches its maximum SY during cardiac systole at a point called "the peak" or "systolic apex"; • The diastolic wave observed between the time when the heart completes the systolic cycle and the diastolic peak DI.
[0081] A representation of these two waves is illustrated in [Fig.1 1].
[0082] It is understood that ECG and PPG signals are cyclic signals due to The heart rate and the repetition of a pattern at each period in rhythm with the heart rate. These patterns allow for the discrimination of areas of interest, enabling the definition of temporal markers within the cycle to synchronize the signals.
[0083] In order to achieve synchronization of these signals, different steps can be implemented.
[0084] According to one embodiment, the first step for synchronizing the ECG signal and the PPG signal comprises determining a first marker of the PPG signal and a second marker of the corresponding ECG signal. These markers are, for example, local minima or maxima such as characteristic peaks.
[0085] According to one example, the markers used are the R peaks of the ECG signal and the trough corresponding to the R peak of the PPG signal taken in the same cycle. Figure 10 illustrates the MECgi and MECg2 markers which are consecutive R peaks on the Sp signal La [Fig. 10] illustrates the MPPGi and MPPG2 markers which are consecutive troughs on the S2 signal.
[0086] According to one embodiment, the second step includes estimating the transit time of the PPG signal relative to the transit time of the ECG signal.
[0087] A pulse transit time is a measure of the transmission delay between the ECG signal and the PPG signal at a certain point in the body.
[0088] According to one embodiment, a measurement of the time difference between an ECG marker and a corresponding PPG marker is performed for each cycle. In another embodiment, the transit time is considered to be the minimum difference measured between two markers of each of the two signals considered in the same cycle. It is understood that the transit time is generally constant over time since this delay depends only on the physics of the signals propagating in a body. By considering the minimum difference, the method of the invention makes it possible to isolate the transit time from all other phenomena that alter the signal measurements.
[0089] In an illustrative example, with reference to [Fig. 10], the filtered ECG and PPG signals of Figures 7 and 9 are synchronized using as markers the peaks R, for the ECG signal, and the corresponding troughs for the PPG signal. Signal segmentation ECG signal
[0090] The method for training the model of the invention includes a segmentation step SEGi of the ECG signal S2 and the PPG signal Si. In one embodiment, the training method and the method for reconstructing an ECG implement a segmentation of each cardiac cycle of the PPG signal. The method for training the MLi model implements a segmentation step of the ECG signal S2 necessary for training the model. The segmented signals are denoted Si' and S2' respectively, with respect to the segmented PPG signals and the segmented ECG signals.
[0091] Figure 12 illustrates a segmentation of an ECG signal in an FT1 window.
[0092] The duration of the segmentation window is advantageously strictly less than two cardiac cycles.
[0093] One advantage is to learn the model with data essentially characterizing the waveform over one cycle and not with data characterizing the rhythm or frequency of the signal.
[0094] This segmentation window has the advantage of improving the learning of the machine learning model because it reduces the error in reconstructing the ECG signal obtained by machine learning for the "QRS" complex.
[0095] This advantage stems from the fact that the training data represents only the signal data for a single cycle. In other words, in the case of segmentation of several cycles, learning would involve learning how to reconstruct the rhythm. However, in the present invention, the heart rhythm is obtained by analyzing the ECG and / or PPG signal without necessarily using a machine learning model. This heart rhythm is then used to reconstruct or consolidate the reconstructed segmented signal into a continuous signal of all the cycles.
[0096] According to various embodiments, the segmentation window comprises at least one complete cycle and possibly a fraction of a subsequent and / or preceding cycle. This window is identical during model training and during the use of the learned model.
[0097] According to one embodiment, the method for training the model and the method for generating an ECG signal includes a SEGi signal segmentation step.
[0098] Regarding the method for training the model, the latter includes an extraction of a second set of sampled points E2 from the second ECG signal S2.
[0099] According to one embodiment, a time window FT2 of predefined duration is fixed. For the ECG signal, this window FT2 is called the second time window. For the PPG signal, the equivalent segmentation window is denoted as the first time window, and is denoted Fn.
[0100] We denote E2 the set of points extracted from the ECG signal defining a segmented signal S2' resulting from the segmentation of the ECG signal in a time window FT2. The points of the set E2 allow us to define an input vector of a machine learning MLI model such as a neural network.
[0101] We denote Ei the set of points extracted from the PPG signal defining a segmented signal Sf resulting from the segmentation of the PPG signal in a time window FT1 so as to define an input vector of a machine learning MLI model such as a neural network.
[0102] According to one embodiment, two consecutive ECG markers, denoted MECg i and MECg2, are defined. These markers are defined to obtain a complete cycle. These markers allow the collection of a first set of sampled points, denoted ENS21, located between said two markers MECg i and MECg2. These ENS2i points are extracted from the received or acquired signal.
[0103] A second subset of sampled points, denoted ENS2, is extracted from the second ECG marker MEC G2 during a predefined duration following the second predefined marker MECg2. The point sets ENS2i and ENS22 partially comprise the point set E2.
[0104] According to one example, the consecutive markers used are two consecutive R peaks of the ECG signal S2'. They are denoted MECgi,MECG2 on [Fig. 10].
[0105] According to one embodiment, the size of the point set ENS2 is less than the size of the point set ENS21. This ensures that a complete cycle is obtained while strictly limiting the points to two cycles.
[0106] According to one embodiment, a third subset of points ENS23 of the second set of points E2 comprises a set of points of the same value following the second subset of points ENS22 so as to complete the second time window FT2. The set of points ENS23 completes the set of points E2. Indeed, since the FT2 window has a fixed duration and the heart rate can vary, the number of points taken from the sets ENS2i and ENS22 can vary and, consequently, the size of the set ENS23 can vary. This third set of points allows for filling in such a way as to maintain a fixed segmentation window.
[0107] In an illustrative example, with reference to [Fig. 12], this segmentation is used for the ECG signal of [Fig. 10]. The set of points in the third subset of points ENS23a has a value of zero. PPG signal
[0108] The method for generating an ECG signal includes a SEGi segmentation step of the PPG Si signal. This method includes extracting a first set of sampled points Ei from the first PPG Si signal. The signal segmentation is preferably identical during the method for training the MLb model
[0109] Fig. 11 illustrates a segmentation of a PPG signal in an FTi window.
[0110] According to one embodiment, a first time window FTid of predefined duration is fixed. According to another embodiment, the time window Fn is the same size as the second time window FT2.
[0111] According to one embodiment, the method of the invention allows for the definition of two consecutive PPG markers, denoted MPPG1 and MPPG2. A first set of sampled points, denoted ENSi1 and MPPG2, is extracted between the two markers MPPG1 and MPPG2. A second subset of sampled points, denoted ENSi2, is extracted from the second PPG marker, MPPG2, up to a predefined point. The set of points Ei comprises the subsets of points ENSi1 and ENSi2.
[0112] According to one example, the two consecutive PPG markers MPPGi and MPPG2 are two consecutive minima corresponding substantially to the two MECgi and MECg2 markers of the ECG signal in the MLi model learning process. One advantage is to retain points that are strongly correlated and correspond to the same physiological phenomena.
[0113] According to one embodiment, the length of the set of points ENS^ is less than the length of the set of points ENSn. This ensures that the window is strictly less than two epochs, in other words, two cardiac cycles.
[0114] According to one embodiment, a third subset of points ENSn of the second set of points Ei comprises a set of points PPG of the same value succeeding the second subset of points ENSi 2 so as to complete the first time window FT b The set of points ENS23 completes the set of points ENSi i andENSi2.
[0115] In an illustrative example, with reference to [Fig. 11], this segmentation is used for the PPG signal of [Fig. 10]. The set of points in the third subset of points ENSi 3a has a zero value. Other segmentation
[0116] According to a second embodiment, another segmentation is possible for the ECG and PPG signals. The segmentation takes all the points within a predefined time interval. The segmentation window includes at least one cardiac cycle and can extend beyond two cycles.
[0117] In an illustrative example, with reference to Figures 13 and 14, a segmentation with a two-second window is used for the PPG Si' and ECG S2' signals. The segmentation has a length of 250 points with a sampling rate of 125 Hz.
[0118] In order to estimate the performance of the models, the relative mean squared error rRMSE and the value of Pearson's correlation coefficient p can be estimated in order to evaluate the methods.
[0119] The first segmentation method yields very good results with p = 0.94 ± 0.05 and RS ME = 0.05 ± 0.02. The second method also yields good results, but lower than the first segmentation method, with p = 0.68 ± 0.24 and RSME = 0.11 ± 0.04.
[0120] Pearson's correlation is a statistical measure that assesses the linear relationship between two continuous variables. It describes the extent to which a change in one variable is associated with a change in another variable. Pearson's correlation takes values in the range of -1 to 1. The closer the Pearson correlation coefficient is to -1 or 1, the stronger the correlation between the two variables. Here, the ECG signal obtained by machine learning follows a trend similar to the expected ECG signal.
[0121] That is to say, the two signals increase or decrease together in a linear fashion.
[0122] Learning a machine learning (ML) model
[0123] Figure 2 represents the different signals processed during the training of the MLp model. The PPG signal acquired by one measurement device is denoted Sp. The ECG signal acquired by another measurement device is denoted S2. The signals segmented and processed by the neural network to be trained are denoted Sf and S2', respectively. The output signal from the neural network to be trained is denoted S2a'.
[0124] The trained MLI machine learning model can continuously predict the ECG signal from a single measurement of a PPG signal. Training the model transforms the input vector from the PPG into an output vector that closely approximates the ECG signal that would have been measured by an ECG measuring device if one were used.
[0125] According to one embodiment, during the machine learning phase, the machine learning model receives as input vectors the set of sampled points E2 from the ECG and the set of sampled points Eq from the PPG.
[0126] According to one embodiment, the CNNi machine learning model is a convolutional neural network called a CNN.
[0127] According to one embodiment, the machine learning model comprises a U-NET type architecture. Such a U-NET architecture is itself based on a CNN architecture.
[0128] In this case, the model includes an encoder ENC, a decoder DEC, a software component to focus the neural network on the most important or relevant parts of the data, a software component called "Attention Gate" and a memory layer represented by the "Biderectional Gated Recourent Unit" called BiGRU.
[0129] The BiGRU is a type of recurrent neural network. It comprises two GRU blocks, one in the direction of forward data propagation and the other in the reverse direction.
[0130] According to another embodiment, an LSTM layer can be used instead of the GRU block. However, this embodiment may require a longer training period.
[0131] According to one embodiment, three blocks are used to implement the ENC encoder. Each block includes at least one convolution layer. The convolution layer, denoted CONV in [Fig. 15], uses filters that scan the input data by performing convolution operations.
[0132] According to one example, the dimensions of the core of each layer increase with the advancement of the layers.
[0133] Each block further includes a normalization layer, such as a layer called "Layer normalization" in Anglo-Saxon terminology. This layer is denoted LN in [Fig. 15]. It allows the outputs of each layer to be normalized. of the neural network. This layer allows the stabilization of the neural network, accelerating the model's learning by enabling faster convergence.
[0134] The latter allows for faster and more stable learning thanks to the normalization of layer inputs.
[0135] Each block also includes an activation function, such as a linear rectified activation known as ReLU, denoted LR. This function allows neurons to be activated or deactivated by adding biases. The so-called "ReLU" layer is also called the linear rectification unit. The activated features are passed on to the next layer, which promotes faster and more efficient learning.
[0136] Fig. 15 represents an example of the architecture of a U-NET type network comprising 3 blocks in the encoder ENC and 3 blocks in the decoder DEC.
[0137] Convolutional layers are denoted CONV, normalization layers at the input of the layers are denoted LN for "Layer normalization" in Anglo-Saxon terminology and activation layers are denoted LR.
[0138] The second and third blocks are denoted RB and correspond to residual blocks. One advantage of a residual block is to improve learning in deep neural networks by allowing a more direct flow of the gradient during backpropagation.
[0139] The implementation of a residual block RB provides a jump connection, which bypasses one or more layers. This connection transmits the block's input directly to its output, adding it to the output of the intermediate layer(s). This is represented in [Fig. 15] in the RB block by an arrow extending from the block's input, allowing the variables or coefficients to be added to the variables or coefficients at the RB block's output before the last LR activation layer. One advantage is that it allows the error signal to propagate more efficiently through the network during backpropagation. This helps mitigate the vanishing gradient problem, particularly in very deep networks. A residual block RB comprises at least one convolutional layer (CONV), one normalization layer (LN), and one rectified activation layer (LR). [Fig. 15] shows an example of such an architecture.
[0140] According to one embodiment, two "Attention Gates" in Anglo-Saxon terminology and marked AG on the [Fig. 15] link the encoder ENC and the decoder DEC.
[0141] According to one embodiment, the decoder also comprises three blocks. The first two blocks each comprise, respectively, a transposed convolution layer CONV_T, a normalization layer denoted LN, and a rectified activation layer ReLU, denoted LR. The final block of the decoder comprises two transposed convolution layers CONV_T separated by a memory layer composed of a BiGRU denoted BG in [Fig. 15].
[0142] The DEC decoder allows the reconstruction of the segmented signal from the characteristics learned by the encoder. Cost function
[0143] According to one embodiment, the training method includes implementing a cost function to calculate the error between the generated output S2a', representing the reconstructed ECG signal, and the initial measured ECG signal S2'. The machine learning model generates an ECG signal S2a', which is then compared to the signal S2' corresponding to the input E2 to calculate this error and minimize it by modifying the coefficients of the convolution layers. The difference A = IS2' - S2b'l is measured using a distance function, such as a root mean square error.
[0144] According to one embodiment, the method includes a feedback loop, for example implemented by means of gradient descent, which allows the network to learn by modifying the coefficients of the convolution layer matrices.
[0145] The ECG signals measured by the S2 electrodes can be split into two groups. A first set of signals is used within the cost function for network training, and the second set of signals is used to validate that sufficient training allows for the achievement of given performance.
[0146] The output signals of the neural network for training are denoted S2a' and for use of the trained network the output signals of the network are denoted S2b'.
[0147] Recombination of signals to form the continuous ECG
[0148] Figure 3 represents the recombination steps of the reconstructed segmented signals. The recombination step is denoted RECOMBi. In this figure, the segmentation step is denoted SEGi and the processing step by the trained neural network is denoted MLi.
[0149] The PPG signal acquired by a measuring device is denoted Sp. The signal processed by the trained neural network is denoted Si'. The output signal from the trained neural network is denoted S2b' and the recombined signal is denoted S2b.
[0150] Figure 16 shows ECG S2 b' signals produced for different successive epochs with the first segmentation. The signals S2 b(t;)', S2 b(ti+i)' and S2 b(ti+2)' are shown.
[0151] Figure 17 shows ECG signals S2 b' produced for different successive epochs with the second segmentation. The signals S2 b(t;)', S2 b(t1+1)' and S2 b(t1+2)' are shown with this second segmentation.
[0152] With the first or second segmentation, the invention makes it possible to recombine these signals together in order to produce a continuous signal.
[0153] We denote S2 b' the non-recombined signals at the output of the neural network and we denote S2 b the recombined signals forming a continuous signal comprising a plurality of epochs.
[0154] To this end, the method for generating an ECG includes a step of combining the signals formed by the output vectors of the neural network. The reconstruction is performed continuously so as to form a continuous ECG signal. The sequence of reconstructed ECG signals is recorded in memory so as to allow processing by a computer embedded in the PPG measurement device or by a remote computer, for example, a computer, a digital tablet, or a server.
[0155] The training method made it possible to generate segmented ECG signals faithful to those that could have been measured by ECG electrodes. One advantage of the method of the invention is that a simple PPG measuring device makes it possible to generate a continuous ECG signal that can be used to detect ECG signal singularities such as arrhythmias, QRS complex fragmentation rates, and heart rhythm variations.
[0156] In order to reconstruct the signals produced by the machine learning model, the ECG generation process includes the detection of consecutive ECG markers. Figure 16 shows only the MECg1 and MECg2 markers on the first signal S2b(t1). The markers used can be local minima or local maxima such as the MECg1 and MECg2 markers. The second S2b signals generated by the MLI machine learning model will be "stitched together" to form a continuous signal using the markers present in each cycle of said second signal S2'. In other words, the recombination can be performed by concatenating the segments produced by the neural network from the temporal markers.
[0157] Marker detection can be performed using an algorithm that takes into account two elements: the search for local minima or maxima, and heart rate. Indeed, by correlating these two pieces of information, the method of the invention ensures that the correct local minimum is considered in combination with the heart rate analyzed upstream of the neural network, during signal acquisition.
[0158] With regard to the training method, the heart rate can be deduced from the PPG signal or the acquired ECG signal. With regard to the ECG signal generation method, the heart rate is advantageously deduced from the PPG signal acquired by the device.
[0159] One advantage is to search for a local minimum or maximum around the heart rate to avoid considering a marker corresponding to the marker of the previous cycle. To this end, a predefined margin of error can be used to search for a local maximum or minimum around a point in the cycle.
[0160] The segments are then combined so as to join one end of one segment with another end of the next segment instead of the maximum value of the local maximum or local minimum, i.e., the marker generated at each cycle. For example, the segments can be joined together at the top of the R peaks.
[0161] Sometimes, because the segmented ECG and PPG data do not perfectly conform to the relationship between the PPG and the ECG signal, particularly because the pulse arrival time has been assumed to be constant, the method of the invention includes a step of interpolating the RR segments to the length of the corresponding local maxima or minima of the PPG signal. One advantage is to reintroduce the known information from the acquired PPG signal in order to obtain the most reliable and accurate reconstructed ECG signal possible.
[0162] Fig. 18 represents a first diagram including the acquired PPG Si signal, a second diagram including the reconstructed ECG S2b signal, and a third diagram representing the two Si and S2b signals allowing visualization of the local maxima and local minima of each cycle.
[0163] An advantage of the invention is that it allows for the reconstruction of an ECG in real time and continuously from the measurement of a PPG signal. A further benefit is that a PPG device requires only one measurement point and can be integrated into a device such as a bracelet or a watch.
[0164] An advantage of the invention is to leverage a trained neural network to reconstruct an ECG signal from a PPG signal cycle and to continuously reconstruct the signal through heart rhythm analysis. Thus, the network's learning is unaffected by cycle frequency, rhythm variation, and potential errors related to heart rhythm reconstruction by the neural network.
Claims
Demands
1. A method for generating an ECG signal from a PPG signal and a trained machine learning (MLi) model comprising: • A first acquisition (ACQi) of a first signal (Si), called the PPG signal, using a sensor arranged on a signal acquisition device in contact with the skin of an individual to measure the variations in pulsatile blood volume • Sampling (ECHi) of the first signal (Si) at a predefined frequency; • A recording (ENRi) of the heart rate (HRc); • Segmentation (SEGi) of the first signal (Si) comprising: • Definition of a first time window (FTi) of a first predefined duration (Ti); • Extraction of a first set of sampled points (Ei) from the first PPG signal (Si), called PPG points, comprising a first subset of points (ENSn) between two consecutive PPG markers (Mppgi MPPg2) and a second subset (ENS12) of consecutive points from the second PPG marker (MPpg2), the number of points in the second subset (ENS12) being less than the number of points in the first subset (ENSn); • Positioning of said first segmented signal (Si ') in the first time window (Fn) from the second PPG marker (MpPG2); • Use of a trained learning model to produce an output vector (VECg) defining a second segmented signal (S2') of an ECG from an input vector (VP pg) containing the data of the first set (Ei); • Recombination of the segments (VECg) produced to reconstruct a continuous ECG signal from: • Detection of at least two consecutive ECG markers (MECG 1) of the second signal (S2') present in each cycle of said second signal (S2'); • Reconstruction of the ECG signal (S2b) by concatenation of segments from the temporal markers S.
2. Method for generating an ECG signal from a PPG signal and a machine learning (MLi) model trained according to the preceding claim characterized in that the heart rate (HR) is used to identify the local maximum corresponding to the ECG marker sought.
3. Method for generating an ECG signal from a PPG signal and a machine learning (MLi) model trained according to the preceding claim characterized in that the ECG markers used during segment recombination are R peaks.
4. Method according to the preceding claim characterized in that two consecutive markers (MPPGi,MPPG2) of the first signal (Si) are used to interpolate the lengths between two consecutive ECG markers of the second signal (S2b).
5. A method according to any one of the preceding claims characterized in that the machine learning model (MLi) is trained according to claim 6.
6. A method for training a neural network to generate an ECG from a PPG signal, said method comprising: • A first acquisition (ACQi) of a first signal (Si), called the PPG signal, by means of a sensor arranged on a signal acquisition device in contact with the skin of an individual to measure variations in pulsatile blood volume; • A second acquisition (ACQ2) of a second signal (S2), called the ECG signal, by means of at least one pair of electrodes placed on the skin of an individual; • Sampling (ECHi, ECH2) of the first signal (Si) and the second signal (S2), each at a predefined frequency; • Recording (ENRi) of the heart rate (HR); • Synchronization (SYNCi) of the first signal (Si) with the second signal (S2), said synchronization (SYNCi) comprising: • Detection of at least one first PPG marker (MppGi) of the first signal (Si) present in each cycle of said first signal (Si); • Detection of at least one first ECG marker (MECgi) of the second signal (S2) present in each cycle of said second signal (S2); • Estimation of a transit time (TJ) of the first PPG signal (S2); • Alignment of the two signals (Si, S2) from a shift of one of the two signals (Sb S2) by the value of the transit time (TJ; Segmentation (SEGi) of the first signal (SJ) and the second signal (S2) comprising: • Definition of a first time window (Fn) of a first predefined duration (TJ; • Extraction of a first set of sampled points (EJ of the first PPG signal (Si), called PPG points, comprising a first subset of points (ENSh) between two consecutive PPG markers (Mppgi MppG2) and a second subset (ENS12) of consecutive points of the second PPG marker (MpPG2); • Positioning of said first segmented signal (Si' ) in the first time window (FTi), said window containing the two consecutive PPG markers (MPPgi ,MppG2); • Definition of a second time window (FT2) of a second predefined duration (T2); • Extraction of a second set of sampled points (E2) from the second ECG signal (S2), called ECG points, comprising a first subset of points (ENS2i) between two consecutive ECG markers (MECgi,MECg2) and a second subset (ENS22) of consecutive points from a second marker (M ECG2); • Positioning of said second segmented signal (S2') in the first time window (Fn), said fe • A model containing two consecutive ECG markers (MECgi, MECg2); • Learning a machine learning model (MLi) comprising: • Generation of input vectors including the first set of points (Ei); • Implementation of a loss function from the second set of points (E2); • Generation of a trained machine learning model (MLi).
7. Method according to claim 6 characterized in that the first marker (Mi) is an R peak of a QRS complex and in that the second marker (M2) is a local minimum of the second signal.
8. Method according to claim 6 characterized in that the transit time is estimated by means of calculating the minimum gap measured between two markers (Mb M2) of each of the two signals (Si, S2) considered in the same cycle.
9. A method according to any one of claims 6 to 8 characterized in that the second subset (ENS22) of points of the second consecutive segmented ECG signal (S2') of a second marker (MECg2) comprises a number of points less than the number of points in the first subset (ENS2i).
10. A method according to any one of claims 6 to 9 characterized in that a third subset of points (ENS23) of the second set of points (E2) comprises a set of ECG points of the same value succeeding the second subset of points (ENS22) so as to complete the second time window (FT2).
11. A method according to any one of claims 6 to 10 characterized in that the acquisition of heart rate (HR) is carried out by means of the analysis of the second ECG signal (S2) comprising the estimation of the intervals between two consecutive peaks (RJ) of the acquired ECG signal, called RR intervals.
12. Method according to claim 11 characterized in that it comprises a heart rate (HR) deviation indicator calculated from the PPG signal (Si) and that calculated from the ECG signal (S2).
13. A method according to any one of claims 1 to 12 characterized in that the second subset (ENSi2) of points of the first consecutive segmented PPG signal (Si') of a second marker (MPPG 2) comprises a number of points less than the number of points of the first subset (ENS21).
14. A method according to any one of claims 1 to 13 characterized in that a third subset of points (ENS b) of the first set of points (EJ) comprises a set of PPG points of the same value succeeding the second subset of points (ENS12) so as to complete the first time window (Fn).
15. A method according to any one of claims 1 to 14 characterized in that the machine learning model (CNNi) is a convolutional neural network called a CNN.
16. Method according to claim 15 characterized in that the CNN neural network is a U-NET type network composed of an encoder, a decoder and a tool for focusing the neural network on the most important or relevant parts of the data, a tool called Attention Gate.
17. A method according to any one of claims 1 to 16 characterized in that the training of the coefficients of the machine learning (MLi) model is carried out from an optimizer and an implementation of a cost function.
18. A method according to any one of claims 1 to 17 characterized in that the acquisition of heart rate (HR) is carried out by means of the analysis of the first PPG signal (Si) comprising the estimation of the intervals between two consecutive markers of the acquired PPG signal.
19. Device for generating a continuous ECG signal comprising a PPG signal sensor and a calculator and memory for implementing the method of any one of claims 1 to 5.