Method and System For Generating An ECG Signal

20230105909 · 2023-04-06

    Inventors

    Cpc classification

    International classification

    Abstract

    A method for generating electrocardiogram (ECG) signals includes detecting at least one cardiac motion induced signal. The at least one cardiac motion induced signal is a seismocardiography (SCG) signal. The method includes transforming the at least one detected cardiac motion induced signal into at least one ECG signal. Multiple channel-specific signals of a multi-channel ECG signal are determined by the transformation from the at least one SCG signal.

    Claims

    1-20. (canceled)

    21. A method for generating electrocardiogram (ECG) signals comprising: detecting at least one cardiac motion induced signal, wherein the at least one cardiac motion induced signal is a seismocardiography (SCG) signal; and transforming the at least one detected cardiac motion induced signal into at least one ECG signal, wherein a plurality of channel-specific signals of a multi-channel ECG signal are determined by the transformation from the at least one SCG signal.

    22. The method of claim 21 wherein all the plurality of channel-specific signals of the multi-channel ECG signal are determined by the transformation from the at least one SCG signal.

    23. The method of claim 21 wherein the transformation is performed using a model generated by machine learning.

    24. The method of claim 23 wherein the transformation is performed using a neural network.

    25. The method of claim 23 wherein the transformation is performed using at least one of an autoencoder, a convolutional neural network, a long short-term memory (LSTM) network, and a neural transformer network.

    26. The method of claim 21 wherein the transformation is carried out by at least one of a predetermined mathematical model and a predetermined transformation function.

    27. The method of claim 23 wherein: generating the model includes evaluating an error function for determining a deviation between the at least one ECG signal and a reference ECG signal; and during the evaluation of the error function, different weights are applied to different signal sections of at least one of the reference ECG signal, the deviation, and the at least one ECG signal.

    28. The method of claim 21 wherein the at least one cardiac motion induced signal is detected contactlessly.

    29. The method of claim 21 further comprising filtering the at least one cardiac motion induced signal prior to the transformation, such that the filtered cardiac motion induced signal is transformed into the at least one ECG signal.

    30. The method of claim 21 wherein: the at least one cardiac motion induced signal is generated by a detector of a device; and the transformation is carried out by a processor of the device.

    31. The method of claim 21 wherein: the at least one cardiac motion induced signal is generated by a detector of a device; and the cardiac motion induced signal is transmitted to a processor of a further device and the transformation is carried out by the processor of the further device.

    32. The method of claim 21 wherein: the at least one cardiac motion induced signal is generated by a detector of a device; and the at least one ECG signal is displayed on a display of the device.

    33. The method of claim 21 wherein: the at least one cardiac motion induced signal is generated by a detector of a device; and the at least one cardiac motion induced signal is transmitted to a display of a further device and is displayed by the display of the further device.

    34. The method of claim 21 further comprising: prior to the transformation of the at least one cardiac motion induced signal, performing a functional test of a detector, wherein the cardiac motion induced signal is transformed only if a specified functional capability is detected.

    35. The method of claim 21 further comprising: prior to the transformation of the at least one cardiac motion induced signal, determining a signal quality of the detected signal, wherein the cardiac motion induced signal is transformed only if the signal quality is greater than or equal to a specified measure.

    36. The method of claim 21 further comprising: prior to the transformation of the at least one cardiac motion induced signal, determining an arrangement of a detector relative to a heart, wherein the cardiac motion induced signal is transformed only if the arrangement corresponds to a specified arrangement or deviates therefrom by less than a specified measure.

    37. A system for generating electrocardiogram (ECG) signals comprising: a detector configured to detect at least one cardiac motion induced signal, wherein the at least one cardiac motion induced signal is a seismocardiography (SCG) signal; and a processor configured to transform the at least one detected cardiac motion induced signal into at least one ECG signal, wherein a plurality of channel-specific signals of a multi-channel ECG signal are determined by the transformation from the at least one SCG signal.

    38. The system of claim 37 wherein the detector is integrated into at least one of an incubator, a bed, a vehicle seat, a pacemaker, and an animal accessory.

    39. The system of claim 37 wherein all the plurality of channel-specific signals of the multi-channel ECG signal are determined by the transformation from the at least one SCG signal.

    40. The system of claim 37 wherein: the transformation is performed using a model generated by machine learning; and the model is based on at least one of an autoencoder, a convolutional neural network, a long short-term memory (LSTM) network, and a neural transformer network.

    Description

    BRIEF DESCRIPTION OF THE DRAWINGS

    [0074] The invention is explained in more detail with the aid of example embodiments. The figures show:

    [0075] FIG. 1 is a schematic representation of a method according to the invention for determining an ECG signal,

    [0076] FIG. 2 is a schematic block diagram of a system according to the invention for generating an ECG signal according to a first embodiment,

    [0077] FIG. 3 is a schematic representation of a system according to the invention for generating an ECG signal according to a further embodiment,

    [0078] FIG. 4 is a schematic flow diagram of a method according to the invention,

    [0079] FIG. 5 is a schematic representation of a system for generating an ECG signal according to a further embodiment,

    [0080] FIG. 6 is a schematic representation of a system for generating an ECG signal according to a further embodiment,

    [0081] FIG. 7 is a schematic representation of a system for generating an ECG signal according to a further embodiment,

    [0082] FIG. 8 is a schematic representation of an example application of the method according to the invention,

    [0083] FIG. 9 is a schematic representation of a system for generating an ECG signal with an incubator,

    [0084] FIG. 10 is a schematic representation of a system for generating an ECG signal with a hospital bed,

    [0085] FIG. 11 is a schematic representation of a system for generating an ECG signal with a vehicle seat,

    [0086] FIG. 12 is a schematic representation of a method according to the invention in a further embodiment,

    [0087] FIG. 13 is a schematic representation of the generation/training of the neural network shown in FIG. 12,

    [0088] FIG. 14 is a schematic representation of synchronized ECG and SCG signals,

    [0089] FIG. 15 is a schematic representation of an ECG signal determined by transformation and an ECG signal recorded by electrodes,

    [0090] FIG. 16a is a schematic representation of a dog harness with a detection means of a system for generating an ECG signal,

    [0091] FIG. 16b is a schematic representation of a horse holster with a detection means of a system for generating an ECG signal,

    [0092] FIG. 17 is a schematic representation of a pacemaker with a system for generating an ECG signal, and

    [0093] FIG. 18 is an example representation of weightings of different signal sections.

    DETAILED DESCRIPTION

    [0094] In the following, like reference signs denote elements with like or similar technical features.

    [0095] FIG. 1 shows a schematic representation of a method for generating an ECG signal 1. Here, a cardiac-motion-induced signal in the form of an SCG signal 2 is detected. This may be done by means of an SCG detection means S, which will be explained in more detail below. Then, a transformation means T, which may in particular be formed as a computing means or may comprise a computing means, transforms the detected SCG signal 2 into an ECG signal 1. Alternatively or cumulatively, a PCG signal, e.g. by a PCG detection means, may also be detected as a cardiac-motion-induced signal and transformed into an ECG signal 1. Further alternatively or cumulatively, a BCG signal, e.g. by a BCG detection means, may also be detected as a cardiac-motion-induced signal and transformed into an ECG signal 1.

    [0096] FIG. 2 shows a schematic block diagram of a system 3 for generating an ECG signal 1 (see FIG. 1). The system 3 comprises an SCG detection means S and at least one transformation means T, which is formed as a computing means. It is shown that the ECG detection means and the transformation means are part of a device 4, for example a mobile phone.

    [0097] FIG. 3 shows a representation of the system 3 for generating an ECG signal 1 in accordance with a further embodiment. As explained above, the system 3 comprises an SCG detection means S and a transformation means T in the form of a computing means. A display means A is also shown, on which the ECG signal 1 is visualized. It is shown here that the SCG detection means S, the transformation means T and the display means A are part of a device 4.

    [0098] The SCG detection means shown in FIG. 2 and FIG. 3 may, for example, be formed as an acceleration sensor, a pressure sensor or a radar sensor, in particular a Doppler radar sensor, or may comprise such a sensor. The SCG detection means may also be formed as a gyroscope or may comprise such a gyroscope.

    [0099] FIG. 4 shows a schematic flow diagram of a method according to the invention. Here, in a detection step S1, an SCG signal 1 is detected, in particular by means of an SCG detection means S, which was explained previously. In an optional filter step S2, the SCG signal 2 detected in this way is filtered, for example high-pass filtered. Also, a so-called trend removal may be carried out in the SCG signal 2. In a transformation step S3, which may be carried out in the transformation means T, the SAG signal is transformed into an ECG signal. Thus, a seismocardiogram may also be transformed into an electrocardiogram. The transformation step S3 may also comprise a plurality of partial transformations. In a post-processing step S4, the ECG signal generated in this way or the electrocardiogram generated in this way is stored, transmitted to at least one further means, and/or visualized, for example on a suitable display means A.

    [0100] FIG. 5 shows a schematic representation of a system 3 for generating an ECG signal 1 (see FIG. 1) according to a further embodiment. A device 4 is shown, which comprises an SCG detection means S. An SCG signal 2 (see FIG. 1) is detectable by this SCG detection means S. Furthermore, the device comprises a communication means K for data transmission between the device 4 and other devices. This communication means K transmits the generated SCG signal 1 to a HUB device 5. This HUB device 5 has a transformation means T formed as a computing means and a communication means K for receiving the transmitted SCG signals. Furthermore, the transformation of the SCG signal 2 into the ECG signal 1 may be carried out by the HUB device 5. It is then possible that the ECG signal 1 determined in this way is then displayed on a display means (not shown) of the HUB device 5. It may also be stored by a memory means of the HUB device 5, which is not shown, or transmitted further by the communication means K.

    [0101] FIG. 6 shows a further illustration of a system 3 for generating an ECG signal 1. In contrast to the embodiment shown in FIG. 5, the SCG signals 2 generated by the SCG detection means S are transmitted via the communication means K to a server means 6 which offers so-called cloud-based services. This server means 6 may comprise a transformation means T, not shown, which carries out the transformation of the SCG signals 2 transmitted by the device 4 into ECG signals 1. In FIG. 6 it is shown that the transformed signals, i.e. the ECG signals 1, are transmitted back to the device 4, wherein they may then be received by the communication means K of the device 4. Then, the ECG signal thus obtained may be stored, further processed or visualized by the device 4, for example by a display means A (not shown) of the device 4.

    [0102] It is possible here that at least one post-processing step is carried out by the HUB means 5 or by the server means 6. In this case, individual, a plurality of but not all, or all of the previously explained post-processing steps may be carried out by the HUB means 5 or the external server means 6.

    [0103] FIG. 7 shows a schematic representation of a system 3 for generating an ECG signal 1 according to a further embodiment of the invention. In contrast to the embodiment shown in FIG. 6, SCG signals 2 detected by the SCG detection means S of the device 4 are transmitted via the communication means K of the device 4 to the server means 6, the transformation means of which then carries out the transformation into ECG signals 1. The ECG signals 1 transformed in this way are then transmitted by the server means 6 to a further device 7, where they are received by means of a communication means K of the further device 7. Furthermore, the ECG signals 1 generated in this way may then be stored in a memory means of the further device 7, processed further by a computing means of the further device 7 or displayed by a display means (not shown) of the further device 7.

    [0104] FIG. 8 shows a schematic application of a system 3 (see e.g. FIG. 2) for generating an ECG signal 1. In this case, a device formed as a mobile radio telephone 4, which comprises an SCG detection means S, not shown, and a transformation means T formed as a computing means, is arranged on a chest of a user/patient 8. It is of course conceivable that instead of the mobile radio telephone 4, another device with an SCG detection means S is also used.

    [0105] By means of the SCG detection means S, SCG signals 2 may then be generated, which are then transformed into ECG signals 1 by the transformation means (not shown) of the device 4 and are then visualized by a display means A of the device 4.

    [0106] FIG. 9 shows a representation of a system 3 for generating an ECG signal 1 (see FIG. 1) according to a further embodiment. The system 3 comprises an incubator 9, wherein a patient 8, for example a premature baby, lies on a mattress 10 of the incubator 9. Further, the incubator 9 comprises a lid 11 covering the lying space for the patient 8. An SCG detection means S in the form of a Doppler radar sensor 12 is arranged on the lid. This Doppler radar sensor 12 is arranged in such a way that a chest area of the patient 8 lies within the detection range of this sensor 12. Alternatively, it would be possible to arrange, for example, an SCG detection means S formed as a pressure or acceleration sensor in/on the mattress 10 or in/on a floor of the incubator 9 on which the mattress 10 rests. If the patient 8 is a premature baby or a newborn baby, an ECG signal 1 that is completely or highly cleansed of environmental artefacts is able to be generated, in particular by means of suitable filtering methods, since, with the comparatively high heart rate of a newborn baby, a reliable reduction of interfering influences of other persons in the vicinity of the incubator 9 is able to be achieved.

    [0107] FIG. 10 shows a schematic representation of a system 3 for generating an ECG signal 1 (see FIG. 1) according to a further embodiment. The system 3 comprises a bed 13 with a mattress 14. Furthermore, the system 3 comprises an SCG detection means S formed as a pressure or acceleration sensor 15, which is arranged in/on the mattress 14. Of course, it is also conceivable to use a Doppler radar sensor, wherein this may be arranged on a gallows 16 of the bed 13, for example.

    [0108] FIG. 11 shows a schematic representation of a system 3 for generating an ECG signal 1 (see FIG. 1) according to a further embodiment. In this case, the system 3 comprises a vehicle seat 17, wherein an SCG detection means S, formed as a pressure or acceleration sensor 18, is arranged in a backrest of the vehicle seat 17. Of course, it is also conceivable to form the SCG detection means S as a Doppler radar sensor and to arrange it in a suitable manner in/on the backrest or at a different location of the vehicle.

    [0109] The embodiments shown in FIGS. 8, 9, 10, 11 allow, in addition to the normal monitoring of vital data and the normal diagnosis of cardiological pathologies, also a favorable, unbroken as well as electrode-free monitoring and thus also the detection of possibly previously undiagnosed cardiological pathologies, such as intermittent atrial fibrillation.

    [0110] FIG. 12 shows a schematic representation of a method according to the invention in a further embodiment. Here it is shown that SCG signals 2 form input data for a neural network NN, which carries out the transformation of SCG signals into ECG signals 1. Thus, the output signals of the neural network NN are the ECG signals 1 to be generated as proposed. In this case, the transformation means T is formed as a neural network NN, comprises such a network, or may execute functions of a neural network NN.

    [0111] FIG. 13 shows a schematic representation of the generation/training of the neural network NN shown in FIG. 12. Here, training data in the form of simultaneously detected SCG signals 2 and ECG signals 1 are fed into the neural network NN, wherein parameters of the neural network NN are adapted in such a way that a deviation between the ECG signals 1 generated by the neural network, which are output data of the neural network NN, and ECG signals of the training data set is minimized.

    [0112] The training dataset may result from a combined measurement of ECG signals, breathing, and seismocardiogram. Such a dataset is available, for example, in the form of a publicly accessible dataset as part of Physiobank. Data from 20 (12 male and 8 female) presumably healthy test subjects were used to test the method. The mean age of the test subjects was 24.4 years (SD±3.10). For the purpose of data acquisition, a Biopac MP36 was used and ECG signals 1 were acquired via the first and second channels and SCG signals 2 via the fourth channel using an accelerometer (LIS344ALH, ST Microelectronics). The test subjects were asked to lie awake and still in the supine position. Three types of recordings were made (basal condition, five minutes; listening to classical music, 50 minutes; control condition, one minute). ECG signals 1 were recorded with a bandwidth between 0.05 Hz and 150 Hz; SCG signals 2 were detected with a bandwidth between 0.5 Hz and 100 Hz. In each channel, sampling was carried out with a sampling rate of 5 kHz.

    [0113] The following is an example of the architecture of the neural network used and the training data, including their pre-processing, as applied for the testing of the method.

    [0114] In particular, to run the neural network on embedded devices and smart wearable devices such as phones, a convolutional autoencoder was used to learn the SCG-to-ECG transformation. The autoencoder uses an encoder and a decoder, each with four one-dimensional convolutional layers. In the encoder, the convolutional layers are followed by a ReLU activation function for mapping non-linearity and a max-pooling layer for reducing computing effort, which is used to reduce overfitting and/or to resolve rigid spatial relation. In the encoder, the first convolutional layer starts with 128 filters with a kernel size of 8; with each subsequent layer, the number of filters doubles. The latent space halves the number of filters. In the decoder, the decoder starts with 256 filters in the first convolutional layer. In the second and third layer, the number of filters is halved in each case. The last convolutional layer reduces the number of filters from 64 to 1. Each layer in the decoder consists of an upsampling layer, a convolutional layer, and a ReLU activation function.

    [0115] SCG and ECG recordings of the dataset were re-sampled at a sampling rate of 100 Hz to match them to the common sampling rates used in acceleration detection, which typically operate between 100 Hz and 200 Hz. This allows for long-term SCG-to-ECG transformation despite the limited computing power of embedded devices. The SCG signal was filtered with a 5-30 Hz fourth-order bandpass Butterworth filter. The signal was then normalized (linear mapping between 0 and 1). Additional filtering of the ECG signals was not performed as they were already pre-filtered.

    [0116] FIG. 14 shows a schematic representation of synchronized ECG and SCG signals, wherein the ECG signal is shown in the top line and the SCG signal is shown in the bottom line.

    [0117] Prior to training, the weights of the convolutional layers of the model were pre-initialized with a Glorot uniform initialization. The loss function is given by the mean absolute error and is optimized by the Adam optimizer with standard parameters and no regularization term. The label or reference is a ground truth ECG signal (ECGGT), so that the autoencoder learns a mapping from SCG signals 2 to ECGGT signals and then transforms the SCG signal 2 to an ECG signal 1 (ECGT) determined by transformation. In the next step, each 512-value SCG window is fed into the network. The result of the model is a 512-value-long ECGT window, which is adapted to the corresponding ECGGT window via loss optimization.

    [0118] A sliding window technique was used for the training to increase the number of samples and to ensure that the network properly captured the transitions between the windows. Choosing a window size of 512 with an overlap of 87.5% resulted in 4,040 usable windows for each participant. For all 20 participants, the input is therefore reshaped to a tensor 20×512×4040×2. Due to the small number of test subjects, leave-one-out k-fold cross-validation was carried out to assess the generalization performance of the model. Performance was calculated by averaging the 20 folds. To illustrate how the ECGT and ECGGT signals look, FIG. 15 shows the transformation result (ECGT signal), which is represented by a dashed line, of a 400-sample-long segment (user 10 in the dataset) with an overlay of the ECGGT, which is represented by a solid line. The results were evaluated using three different types of metrics: 1) signal-level assessment; 2) feature-level assessment; 3) domain expert assessment.

    Signal-Level Evaluation

    [0119] Cross-correlations were used to compare the ECGGT with the ECGT. Both signals are highly correlated with a correlation coefficient of r=0.94. To analyze the quality of the signal-level transformation results, a number of appropriate ECG comparison values including the mean square error, normalized mean square error, root mean square error, normalized mean square error and percentage mean square difference were also evaluated. In addition, leave-one-out cross-validation was carried out with all test subjects and the means and standard deviations for each indicator were calculated. Results are shown in Table 1.

    Feature-Level Assessment

    [0120] For feature-level comparisons, two important ECG features, namely the number of R-peaks and the duration of QRS complexes, were extracted from both signals.

    TABLE-US-00001 TABLE 1 Mean values (M) and standard deviations (SD) for ECG comparative values Parameter M ± SD Cross-correlation 0.94 ± 0.05 Mean square error (MSE) 0.01 ± 0.01 Normalized mean square error (NMSE) 0.79 ± 0.59 Effective value (RMS) 0.84 ± 0.30 Normalized root mean square value (NRMS) 0.09 ± 0.05 Percentage of effective value deviation 84.4 ± 30.5

    [0121] To identify QRS complexes and R-peaks in the signals, the Pan-Tompkins algorithm was applied. The number of correctly detected R-peaks and the duration of the QRS complexes were used to compare the number of R-peaks and the duration of the QRS complexes. To investigate the differences between the ECGGT and the ECGT, a non-parametric Bland-Altman test was carried out. This Bland-Altman analysis showed, in accordance with the hypothesis, no significant differences between the ECGGT and the ECGT for both the number of R-peaks identified (mean bias=−8.0, 95% CI=−60 to 44, r2=0.97, p=0.56) and the length of QRS complexes (mean bias=−0.34, 95% CI=−1.9 to 1.2, r2=0.02, p=0.12).

    Evaluation by Experts

    [0122] For this, feedback was collected from 15 cardiologists who examined examples of congruent signals as well as signals with a stronger statistical deviation. The experts were asked to rate the rhythmological and morphological diagnostic value of the signals on a 5-point Likert scale (1—very poor, 2—poor, 3—neutral, 4—good, 5—very good). The average scores for the congruent signals reached 4.87 out of 5 for rhythmological and 4.67 out of 5 for morphological diagnostic value. Even for the signals with lower statistical congruence, the average result was 4.73 out of 5 for the rhythmological and 4.60 out of 5 for the morphological diagnostic value. These results show that the proposed method ensures the determination of an ECG signal 1 with a high reliability and validity. At the signal level, strong correlations between the ECGT and the ECGGT (cross-correlation r=0.94) could be found. At the feature level, comparisons for the number of R-peaks and the length of the QRS complexes demonstrate the agreement of the ECGGT with the ECG signal 1 determined by the transformation applied in accordance with the invention. In general, the data set used provided a high quality of the SCG and ECGGT signals. Nevertheless, some recordings contained motion artefacts that affected both signals. Low-quality ECGGT data and motion artefacts in the SCG data reduce the quality of the ECG signal 1 (ECGT) determined by transformation, influence the number of detected R-peaks in noisy signal sections, and lower the correlation coefficient. On the other hand, artefacts in the ECGGT also reduce the correlation coefficient if the artefact-free SCG signal 2 enabled the determination of a high-quality ECG signal 2. In these cases, the ECG signal 1 as determined according to the invention proves to be better than the recorded ground truth. In particular, in the case of artefacts in the ECGGT signal due to incorrect electrode placement, the ECG signal 1 determined by transformation may provide more accurate results, as it may be generated independently of an electrode connection or correct electrode placement. Systematic feedback from cardiologists also demonstrates the clinical validity and relevance.

    [0123] In addition, the method proposed according to the invention, which may also be referred to as the Heart.AI method, enables rhythmological pathologies (e.g. atrial fibrillation) to be reliably identified. Furthermore, the contactless applicability of the method, its simple application and the high availability are advantageous. Also advantageous is the possibility to apply the method with SCG detection means in hospital beds or beds in care facilities or even in the home environment. Also advantageous is the ease of use in rural areas where there is often a shortage of general practitioners and in particular specialists. The proposed method may be easily and cost-effectively used in such a scenario for telemedicine applications.

    [0124] Furthermore, an existing device with a means capable of detecting an SCG signal 2, e.g. an acceleration sensor or a gyroscope, may be made able to carry out the proposed method by way of a software update. Thus, the functionality provided by the method may be retrofitted on a wide range of devices, which results in a broad applicability of the method. A further advantage is that a simple and reliable permanent detection of precordial movements (SCG signal) is possible, which then also enables the permanent and reliable determination of an ECG signal, in particular in a period longer than 24 hours. It is also advantageous that the required sensor technology is inexpensive and that the required sensors are already installed in many usable devices and may therefore—as explained above—be used for carrying out the method. The proposed method may also be used to subsequently transform already generated SCG signals 2 into ECG signals 1. This is particularly beneficial for scientific investigations.

    [0125] FIG. 16a shows a schematic representation of a dog harness 19 with an SCG detection means S of a system 3 for generating an ECG signal 1 (see FIG. 1), wherein the SCG detection means S is formed as an acceleration sensor 18. It is shown that the SCG detection means S is arranged in a region of the dog harness 19 which rests against a chest region of the dog 20 wearing the dog harness 19 in the intended manner.

    [0126] FIG. 16b shows a schematic representation of a horse halter 21 with an SCG detection means S of a system 3 for generating an ECG signal 1 (see FIG. 1), wherein the SCG detection means S is formed as an acceleration sensor 18. It is shown that the SCG detection means S is arranged in a region of the halter 21 which rests against an upper back region of the horse 22 wearing the halter 21 in the intended manner. However, it is also conceivable that the SCG detection means S is arranged in an area of the halter 21 that rests against the belly or chest area of the horse 22 wearing the halter 21 in the intended manner.

    [0127] FIG. 17 shows a schematic representation of a pacemaker 23 with a system 3 for generating an ECG signal 1. A rate-adaptive pacemaker 23 is shown, which comprises an SCG detection means S, which is formed as an acceleration sensor 18. Further, the pacemaker 22 comprises a transformation means T. Not shown is a communication means K of the pacemaker 23, which is able to transmit the ECG signal 1 determined by transformation to a means external to the body, for example a display means A or a server means 6. However, it is not mandatory that the pacemaker 23 comprises the transformation means T. Thus, it is also possible that the pacemaker 23 does not comprise a transformation means T and the output signals (raw signals) of the SCG detection means S are transmitted to a computing means external to the pacemaker, e.g. via the communication means K.

    [0128] FIG. 18 shows an example representation of weightings of different signal sections for the evaluation of an error function. The top line shows an ECG signal. Three different signal sections SA1, SA2, SA3 are shown in the ECG signal, wherein the different signal sections are enclosed by a rectangle. The first signal section SA1 is a P-wave signal section, the second signal section SA2 is a QRS complex signal section, and the third signal section SA3 is a T-wave signal section. The second, middle row shows weighting factors w1, w2, w3 assigned to the individual signal sections SA1, SA2, SA3. Thus, a first weighting factor w1 is assigned to the first signal section SA1, a second weighting factor w2 to the second signal section SA2, and a third weighting factor w3 to the third signal section SA3. It can be seen that the first weighting factor w1 is greater than the second and the third weighting factor w2, w3, the third weighting factor w3 being greater than the second weighting factor w2. It is possible that the weighting factors are greater than one. However, it is also possible that all weighting factors w1, w2, w3 are equal and greater than one, whereby the signal sections SA1, SA2, SA3 that are relevant for an ECG are weighted higher in relation to the remaining, non-relevant signal sections. The third, lower line shows a signal curve of the weighted ECG signal, wherein the amplitude of the ECG signal in the first signal section SA1 has been weighted, in particular multiplied, by the first weighting factor w1, in the second signal section SA2 by the second weighting factor w2, and in the third signal section SA3 by the third weighting factor w3.

    [0129] The weighting may also be carried out by convolution of the ECG signal with a window function. This weighting may be used in particular to carry out amplitude compensation. In this way, it is possible to avoid large signal changes being weighted higher than smaller changes, which is the case, for example, when determining the deviation with the mean square error method. In the case of the ECG signal, however, small elevations (e.g. the P-wave enclosed in the first signal section SA1) contain important information. It is conceivable that in this way different signal sections of an ECG signal 1 determined by transformation as well as different signal sections of a reference ECG signal are weighted, and after the weighting the deviation between the weighted signals is then determined in order to train the model for the transformation, in particular a neural network. The phrase “at least one of A, B, and C” should be construed to mean a logical (A OR B OR C), using a non-exclusive logical OR, and should not be construed to mean “at least one of A, at least one of B, and at least one of C.”