Completing the Cabrera Circle: deriving adaptable leads from ECG limb leads by combining constraints with a correction factor

Objective. We present a concept for processing 6-lead electrocardiography (ECG) signals which can be applied to various use cases in quantitative electrocardiography. Approach. Our work builds upon the mathematics of the well-known Cabrera sequence which is a re-sorting of the six limb leads (I, II, III, aV R, aV L, aV F) into a clockwise and physiologically-interpretable order. By deriving correction factors for harmonizing lead strengths and choosing an appropriate basis for the leads, we extend this concept towards what we call the ‘Cabrera Circle’ based on a mathematically sound foundation. Main results. To demonstrate the practical effectiveness and relevance of this concept, we analyze its suitability for deriving interpolated leads between the six limb leads and a ‘radial’ lead which both can be useful for specific use cases. We focus on the use cases of i) determination of the electrical heart axis by proposing a novel interactive tool for reconstructing the heart’s vector loop and ii) improving accuracy in time of automatic R-wave detection and T-wave delineation in 6-lead ECG. For the first use case, we derive an equation which allows projections of the 2-dimensional vector loops to arbitrary angles of the Cabrera Circle. For the second use case, we apply several state-of-the-art algorithms to a freely-available 12-lead dataset (Lobachevsky University Database). Out-of-the-box results show that the derived radial lead outperforms the other limb leads (I, II, III, aV R, aV L, aV F) by improving F1 scores of R-peak and T-peak detection by 0.61 and 2.12, respectively. Results of on- and offset computations are also improved but on a smaller scale. Significance. In summary, the Cabrera Circle offers a methodology that might be useful for quantitative electrocardiography of the 6-lead subsystem—especially in the digital age.


Introduction
Electrocardiography (ECG) is one of the most widely used tools in primary care as it allows fast, accurate, and non-invasive assessment of the cardiovascular status by measuring the heart's electrical activity.Several electrodes are attached to the skin and record electric potential differences which stem from the depolarization and repolarization of the myocardium during the cardiac cycle and are visualized as a graph showing voltage versus time.
A fundamental property of ECG is the configuration of electrodes and leads.Electrodes are conductive pads which are fixed to the skin and measure potentials while leads are derived by potential differences measured by different electrodes.
For example, standard 6-lead ECG consists of the six 'limb leads' (I, II, III, aVR, aVL, aVF) which are based on three electrodes attached to the left and right arm and the left leg.Leads I-III are called 'bipolar' and were proposed by Einthoven in 1902.They are defined by the differences of two electrode potentials.Further leads have been defined by using different reference potentials.The 'augmented' unipolar leads aVR, aVL and aVF were proposed by Goldberger in 1942 using two electrodes as reference, building upon the non-augmented limb leads VR, VL and VF proposed by Wilson in 1934 who created a common ground from all three electrode potentials as reference potential.The sequence of limb leads is typically visualized in its historical order which has no anatomically correspondence.The 6-lead ECG measurement can be extended towards twelve leads by placing additional electrodes on the torso, resulting in six additional 'precordial leads' (V1, V2,L, V6).
1.1.Reference potentials of Einthoven, Goldberger, and Wilson limb leads Any ECG measurement is based on the voltages of the cardiac system which are defined as differences of electric potentials Φ.In case of the Einthoven leads, Φ i is measured by electrodes attached to a certain parts i ä {R, L, F} of the body with letters R, L, and F representing the right hand, left hand, and left foot, respectively.
The Einthoven leads are then defined as However, it also possible to determine derived potentials in which some electrodes are connected with resistors which is the case for Goldberger and Wilson limb leads.The reference potentials, sometimes called common ground or central terminal, can thus be derived by Ohm's law in conjunction with Kirchhoff's knot rule.
Wilson introduced a common ground by combining all three electrode potentials.The situation is depicted in figure 1(a).The voltages between Φ R and Φ W , Φ L and Φ W together with Φ F and Φ W are given by U R = Φ R − Φ W , U L = Φ L − Φ W and U F = Φ F − Φ W , respectively.Due to the common resistor (typically R = 5 kΩ), they are related via Ohm's Law to the currents I R = U R /R, I L = U L /R and I F = U F /R. Kirchhoff's knot rule states, that the sum of the currents in point W must be zero such that I R + I L + I F = 0. Multiplying the latter equation by R gives 0 This allows for a symmetric definition of leads with The same reasoning can be applied to the Goldberger situation depicted in figure 1(b).Since the sum of each pair of currents I i + I j = 0 for {i, j} ä {R, L, F}, i ≠ j, the reference potentials for Φ k , k ≠ {i, j} are half the sum of the the two potentials.The voltages between Φ i and G k F or Φ j and G k F are given by U i i G k = F -F and = F -F , respectively.They are related to the currents I i = U i /R and I j = U j /R.The sum of the currents in point G must be zero such that I i + I j = 0.This gives The Goldberger reference potentials are only based on averages of the two others.However the presence of the considered electrode's potential Φ i in the common ground in equation (5) results in Hence, these augmented leads aVi are defined by which gives the well-known relationship The multiplication factor of this leads by 3 2 is the reason, why they are called 'augmented'.For further reference, we will write them explicitely down: The first equation is visualized in figure 1(b).By combining Goldberger and Einthoven leads, we arrive at 6-lead ECG where the leads are derived from three electrodes.Since voltages are defined as differences between such electric potentials, only two leads can be viewed as linear independent.This also holds for 12-lead ECG having eight independent and four redundant leads (Malmivuo and Plonsey 1995).The four redundant leads belong to the 6-lead subset of 12-lead ECG.Hence, two remaining leads may be viewed as carrying the whole information of 6-lead ECG.

Cabrera sequence
In 1944, Enrique Cabrera and co-workers proposed a re-sorting of the Einthoven (I, II, III) and Wilson limb leads (VR, VL, VF) into a physiologically interpretable order (VL, I, −VR, II, VF, III).The second half of that order is done by reverting polarity, i.e. inverting signs (-VL, −I, VR, −II, −VF, −III) (Sodi Pallares et al 1944) which is called 'Cabrera sequence' nowadays.This extended the triaxial system of Bayley (1942) towards an hexagonal one.The claimed sequence starts at −30°with the VL lead, followed by lead I at 0°, and the remaining leads in steps of 30°.Thereby, a complete circle is formed.Figure 2 depicts a) a typical illustration of the six limb leads and b) the original drawing by Cabrera.The latter uses the non-augmented leads VL, VR, VF which have been replaced nowadays by the Goldberger leads 3 so that the recent Cabrera sequence is (aVL, I, −aVR, II, aVF, III).
This visualization is frequently used in teaching the 6-lead ECG system as its order reflects the cardiac signal in its anatomically correspondences, progressing from left superior to right inferior clockwise (from the viewpoint of the observer).There is a recommendation by the American Heart Association to use it for teaching ECG diagnoses (Wagner et al 2009).Note, that the use of the Cabrera sequence does not alter the interpretation of the precordial leads V1−V6.However, the role of the augmentation factor 3 2 still remains unclear: To extend the cycle to a circle, the augmentation factor has to be fixed to a specific value.

Related work
In clinical practice, 12-lead ECG is the gold standard for diagnosing multiple cardiac abnormalities which is done typically by inspecting ECG printouts visually.A heartbeat is represented by a fixed sequence of so-called 'waves' (P-QRS-T) and cardiac abnormalities can be identified either from an unusual morphology of the waves or too short or too long time intervals betweem them.Examples for morphology changes are fragmented QRS complexes (Das and Zipes 2009) or T-wave alternans as a predictor for sudden cardiac arrest (Ikeda et al 2002, Monasterio et al 2009) or widened QRS complexes as a marker for bundle branch blocks (Tan et al 2020).Regarding changes in intervals, the ST segment is the interval between the S-wave and the beginning of the 3 Please note that subsequent to the first publication in Spanish (Sodi Pallares et al 1944), two longer ones in French appeared, namely a monograph by Enrique Cabrera in 1948(Cabrera 1948), and an article by Bruno Fumagalli in 1949(Fumagalli 1949) in which the correct sequence is used for the first time in figures arranging the leads.In 1950, Jackson and Winsor defined the electrical axes of the ECG with the correct further augmentation as tables (Jackson and Winsor 1950).In 1951, Graettinger agreed with that augmentations and presented the whole Cabrera Cycle in circular arranged plots of the limb leads (Graettinger et al 1951), which was later confirmed by Fumagalli (Fumagalli 1954).
T-wave and is used for detecting ischemic events (Sandau et al 2017).The duration between Q and T-waves (QT interval) is another risk predictor but can also stem from certain medications (Isbister and Page 2013).Hence, the automatic detection of the on-and offset as well as the center of ECG waves, a process entitled 'delineation', is an important part for subsequent steps of the processing pipeline.The detection of the R-peak enables the computation of the heart rate and the detection of the on-and offsets enables computation of clinically relevant intervals.
In the field of computer-aided diagnosis, much research effort is undertaken to reduce the number of leads: next to economical reasons such as limited availability of 12-lead ECG devices and medical experts in underprivileged countries, a lower number of leads is more feasible in emergency situations (Green et al 2007) and during ambulatory long-time ECG monitoring (Jabaudon et al 2004).Furthermore, the less lead numbers are needed, the less storage is necessary.In the past, this led to many works focusing the generation of 12-lead ECG from a reduced-lead ECG (Tomasic and Trobec 2014), e.g. with the help of linear affine transforms (Dawson et al 2009), reconstruction using patient-specific templates (Nelwan et al 2004), blind source separation techniques (Owis et al 2002, Tsouri andOstertag 2014), or Neural Networks (Smith et al 2021).Related fields of application for deriving synthetic leads are the correction of ECG leads if electrodes have been swapped during acquisition (Krasteva and Schmid 2019) or the definition of alternative lead systems (Finlay et al 2010).
These approaches are interrelated to vectorcardiography (VCG), which tries to reconstruct the cardiac dipole from body surface electrode measurements.Such a VCG can be used to reconstruct the 12-lead signals within a certain accuracy (Dower 1984, Dower et al 1988, Feild et al 2002).These investigations begun in 1956 by E Frank and his specialized lead system but did not end up in a standardization and is therefore not used in routine clinical practice (Hasan and Abbott 2016).
Recently, methods from the field of deep learning (DL) became popular for ECG-related tasks (Somani et al 2021, Petmezas et al 2022).For example, DL-based ECG classifications show promising results reaching accuracy similar to human experts (Hannun et al 2019, Ribeiro et al 2020, Reyna et al 2021).An issue in training DL networks is class imbalance which typically leads to over-classification of the majority group.Li et al tackled that issue by using generative adversarial networks (GAN) for generating synthetic ECG leads to augment the size of the minority class in myocardial infarction detection (Li et al 2022).DL-based approaches have also been used to reconstruct leads.For example, Deng et al proposed a network that uses lead I signals to synthesize the remaining 11 leads which are then used for ECG classification (Deng et al 2020).Similarily, Lee et al synthesized precordial leads from the limb leads using a GAN (Lee et al 2020).

Outline
In this work, we revisit the fundamentals of the discrete Cabrera sequence and extend it towards a continuous circle, called the 'Cabrera Circle', based on a mathematical proper definition.One of the main features of this novel representation is that it allows to derive a new lead we will call 'radial lead' which can be easily applied to specific use cases.
We start by reviewing fundamentals of ECG acquisition (section 2.1), i.e. the dependencies between Goldberger and Einthoven leads (section 2.1.1)and building upon that we show how to use leads I and aVF as a basis for all other leads (section 2.1.2).Subsequently, we review the correction factor for harmonizing Einthoven and Goldberger leads (section 2.2.1).Based upon these preliminaries, we demonstrate how to extend the discrete Cabrera sequence towards the Cabrera Circle (section 2.2.2).
To demonstrate practical effectiveness and relevance of the proposed method, we analyze its suitability qualitatively and quantitatively.In the first analysis (section 2.3.2,we introduce an interactive tool building upon the continuous Cabrera Circle which offers a 2D visualization which allows to freely define a radial lead and demonstrate its potential for determination of the electrical heart axis (EHA), sometimes called cardiac axis.In the second analysis (section 2.3.3),we fully-automatically generate the radial lead and demonstrate how it improves the accuracy in time of existing state-of-the-art algorithms for ECG processing.On the one hand, we target the traditional use case of R-wave detection (Kohler et al 2002) which can be assumed as being scienficially 'solved' as many detectors achieve high accuracy in detecting R-waves and only fail in rare cases.On the other hand, we target the use-case of T-wave delineation, i.e. the computation of its onset and offset, next to the peak, which is signficantly more challenging due to the subtleness of these parts.We apply different open-source algorithms for both tasks to a freely-available dataset (Kalyakulina et al 2020) and demonstrate that using the radial lead improves accuracy in time.
Finally, we give results of the use case and discuss them, consider pros and cons (section 3), and give avenues for future work (section 4).

Fundamentals of electrocardiography
In the following we review the relationships between ECG leads and signal strengths.

Relationships between leads
The well-known relationships between the Einthoven and Goldberger leads can be easily derived by their definitions based on the three electrode potentials, and are given by reflecting that of the three leads involved in each equation only two are independent.As all leads are derived from the three electrode potentials, they can be defined by any two of the other leads.The method to derive the relationships between each triple of leads and the resulting matrix of these constraints C can be found in appendix A.

The choice of I and aVF as basis
The fact, that one can use any two leads to derive the other four leads can now be used to use two leads as the basis of the coordinate system-rather than the three-parameter system defined by the potentials.They are interrelated through suitable potential differences which define the voltages of the leads.Based on the anatomical point of view, lead I represents the voltage between the left and the right arm and is considered as horizontal axis in a standing person (and therefore identified with a horizontal x-axis in mathematics).The lead aVF represents the voltage between the left foot and the mid between the arms and is considered as vertical axis in a standing person (and therefore identified downwards, towards the vertical −y-axis in mathematics).They are typically used for displaying the Cabrera sequence by augmenting the Wilson limb leads in figure 2(b) to the Goldberger ones4 .In this (I, aVF)-basis we express the other four leads with the help of the matrix of constraints C: Having in mind that the angles 30°and 60°correspond to the vectors ( ) respectively, we notice, that the leads are only approximately ordered in 30°segments.We also notice that the lengths (or strengths) of the leads are not normalized.Figure 3 shows the points corresponding to the right-hand side of the equations.One can easily see the deviations of both: the points not being on the unity circle and the angles of the leads not being equally distributed in 30°distance.This is also true for the original Cabrera Circle based on Wilson's limb leads, where the deviations are even larger.To give an example, the polar coordinates (r, j) for lead II with respect to the bases (I, aVF) and (I, VF) are ( ( ) r 1.12 arctan 2 63 arctan 3 72 angles is a multiple of 30°, we conclude, that neither VF nor aVF can serve as suitable basis elements.As Einthoven and Goldberger leads have different strengths, a correction factor for VF or aVF is required as their combination might otherwise produce inaccurate results.Such a correction factor has been proposed by Novosel et al (1999) while referring to Madanmohan and Saravanane (1990).First hints towards such correction factors can be found in works by Cabrera (1948), p. 51, Fumagalli (Fumagalli 1949), p. 893 and Hill (Hill 1946); the latter work treats the relationship between Einthoven and Wilson limb leads.

The Cabrera Circle
In this section, we derive the correction factor using the equilateral Einthoven triangle (section 2.2.1).This is in contrast to the previous works, which use the dipole model together with trigonometric identities.By combining this correction factor of the Goldberger with the Cabrera sequence, we obtain a new basis for the leads.This allows us to arrange the corrected leads on a circle, which we denote as 'Cabrera Circle' (section 2.2.2).Additionally we demonstrate, that this arrangement has a sound mathematical foundation (section 2.2.3).

Deriving the correction factor from the equilateral Einthoven triangle
In the following, we use the naming convention of figure 4. The following text is to be interpreted in terms of analytic geometry.By scaling the leads with an arbitrary voltage U 0 , the problem get dimensionless an can be treated by geometry.We use the mathematical sign convention in this chapter.We begin with the coordinate system in the point OI, from where the lead i ≔ I/U0 is defined on the horizontal axis.The second lead is defined by moving to (−1, 0) and then towards the lead-II direction ( ( in radians and mathematical sign convention by the factor 1 + ii = 1 + II/U0.The normals to these points are perpendicular to the respective borders of the Einthoven triangle.They can be calculated by exchanging x and y of the vectors along these borders with changing one sign.This is justified by T -=-+ = .Now we can calculate the intersection S of these lines, which is given as Now we switch to the middle M of the Einthoven triangle.Since the triangle chosen here has a side-length of two, the radius of the inscribed circle (dashed in figure 4) is given by r If we subtract this from the ycomponent of equation ( 19), and re-multiply it by U0, we obtain the vertical signal component as The latter follows from equation (A3).This is exactly the correction factor proposed by Novosel et al and earlier together with the mathematical sign convention.Note, that this correction term has a geometrical interpretation with regard to the equilateral Einthoven triangle: It is the side-length of the triangle divided by its height.The correction factor ≔ m 2 3 can be used to modify the basis, in which we express the other leads.Due to the symmetry of the equilateral Einthoven triangle, the other Goldberger leads have to be corrected by the same factor, too.As introduced before, the letter 'a' in the Goldberger leads represents 'augmented', therefore we introduce the letter 'm' for a 'modified' lead: and combine it with lead I as a new (I, mVF)-basis.
This correction can be viewed as conversion factor amplifying Goldberger to Einthoven leads with equivalent amplitude.By interpreting the outcome of Hill (1946) as the similar conversion factor 3 from Wilson limb to Einthoven leads, we obtain a short and historical founded derivation.Multiplying the reciprocal value from Einthoven to Wilson leads with the well-known augmentation factor 3 2 one obtains •  from Goldberger to Einthoven leads we previously derived for constructing the Cabrera Circle.The conversion factors for all leads of the 6-lead subsystem are summarized in table 1.

Constructing the Cabrera Circle by using the (I, mVF)-basis
At first, we define the Cabrera function This equation can be found by using our equation (A3) together with the online supplement of [(Dahl and Berg 2020), equation (7)] and is discussed in Novosel et al (2021) 5 .It is obvious, that I = C F (0°) and mVF = C F (90°).We obtain furthermore The points corresponding to the right-hand-sides of these equations are shown in figure 5. Note, that the points are now located on a common circle and that the consecutive angles between two Cabrera-ordered leads are always equal to 30°.= .As the points lie on a circle and have consecutive angle increments of 30°, we call this representation Cabrera Circle.Any angles can now be chosen for projection.Einthoven 1 5 Note, that this equation is only correct within the medical sign convention for angles since the signs of α and of mVF cancel out each other.
In mathematical sign convention, one would have to use and matrix M defined as The dot • denotes the matrix multiplication and the superscript *T denotes the transposition.Note, that the row sums of M are all equal to zero and that the euclidean norm of each row vector is equal to 2 .
This matrix allows us, to express the former calculations in terms of linear algebra.For instance, the nullspace of M T , that is the basis of all constraints, achieves the simple form which can be justified by = ´.So the column vectors of C C form a basis of the four redundand leads in 6-lead ECGs.The repeated pattern ( ) 1, 3 , 1 of coordinates can be interpreted to as weights for three adjacent leads, e.g.III mVF II 3 0 -+ = .This holds true for all adjacent lead combinations around the Cabrera Circle.This simple structure of C C justifies, that the Cabrera Circle has clear mathematics behind it.

Applications
We evaluate the suitability of the Cabrera Circle for two typical ECG use cases using qualitative and quantitative analysis.

Datasets
We use two freely-available ECG datasets for analysis which both are offered via Physionet (Goldberger et al 2000).In both databases, signals were acquired using medical-grade ECG devices by a single company (Schiller AG).The first use case is based on the PTB-XL database (Wagner et al 2020) which is a large-scale, 12-lead ECG dataset containing 21 801 clinical signals from 18 869 patients.All records have a length of 10 s and were sampled at 500 Hz and 100 Hz.Next to the raw data, the authors provide rich metadata with clinical and technical annotations.
For the second use case, we use the Lobachevsky University ECG Database (LUDB) (Kalyakulina et al 2020) which contains 200 records of 10 s 12-lead ECG signals sampled at 500 Hz.The study cohort consists of healthy volunteers but also contains data acquired from patients suffering from different cardiovascular diseases.Physicians provided manual annotations of 21 966 QRS complex locations.Next to the raw ECG data and annotations, metadata with information on the rhythms (e.g.Sinus rhythm, tachycardia, bradycardia) are provided.

Use case 1: an interactive tool for inspecting the ECG 2D vector loop and determining the electrical heart axis
We propose a novel visualization and manipulation tool based on the Cabrera Circle for gaining insight into an ECG signal and to determine the EHA of the patient.The basis (I, −mVF) is used to visualize a 6-lead ECG as a 2D vector loop in cartesian coordinates.The aim of this tool is to offer an interactive and easy-to-use alternative to existing methods for EHA determination based on visual inspection of static ECG printouts.
The EHA represents the main direction of the heart's electrical activity and is therefore defined in degrees of deviation from zero.Usually, the degree values are binned into different categories, e.g.−30°to 90°represent a normal EHA while −30°to −90°represent a left axis deviation that might indicate certain diseases.In a clinical setting, the EHA is measured manually by using the maxima of the R-peaks of the I and mVF-lead and calculating ( ) mVF I arctan , but the leads achieve their maximal (or minimal) deflections at slightly different time stamps, which bears the problem of reduced accuracy.In appendix B we review some traditional EHA determination methods.
Since we have access to both leads I and mVF, we can determine the major direction in the Cabrera Circle by using instead.This can be justified by trigonometric half-angle theorems 6 and is equivalent to the definition of the atan2(y, x)-function implemented in several programming languages.This definition has the advantage of covering the whole plane spanned by I and mVF, and makes manual decisions to determine the sign of the EHA unnecessary.Values near the negative I-axis do depend on the sign of the mVF-component, since the negative xaxis corresponds to the situation j A = ±180°= ±π.
The developed tool consists of two parts: The first is an interactive visualization of 2D vector loop which is similar to the manner, in which the cabrera cycle is taught in cadiologic textbooks.The signals I and −mVF are taken as input for a parametric plot (I(t), −mVF(t)) where each discrete sample will produce a point in the plane.The EHA of the QRS complex is located at that sample with maximal deflection from the isoelectric origin.This sample is used to calculate the angle between the horizontal axis of the I-lead and the current position of the radial maximum using equation (32).The second part of the tool is a conventional ECG plot showing the projection of the vector loop versus time, e.g. an interpolated lead.The 2D vector loops in the first part are shown together with the line corresponding to an angle which can be interactively chosen.If this angle is a multiple of 30°(e.g.ranging from −60°to 120°), the ECG plots correspond to an usual member of the Cabrera Cycle together with its sign.
The tool allows to interactively define arbitrary leads in the Cabrera Circle that can interpolate between the usual ones.However, the angle can be freely chosen, allowing the user to define own projections and analyze the influence on the generated signal shown in the second part.Additionally, one can interactively choose a single sample, which appears in both plots and offers selecting points of interest, e.g.P or T-waves.
The programming was done in the R programming language (R Core Team 2021) version 4.1.2(01-11-2021) using the IDE RStudio (Posit Team 2022).The plots were made interactive by using the library 'manipulate' (Allaire 2014).We used colors of equal luminance from the 'colorspace' library (Zeileis et al 2020).For demonstration purposes, we manually selected signals from PTB-XL.In order to avoid a possible influence on the results, no preprocessing was applied to the data.By using PTB-XL metadata we made sure signals not show technical artifacts.

Use case 2: the radial lead for improving ECG processing
A typical use case in ECG processing is detection of the R-peak of the QRS complex with a multitude algorithms being proposed in the past.Although the landmark algorithm by Pan and Tompkins proposed in 1985 (Pan and Tompkins 1985) showed >99.3 sensitivity on a specific data set, detectors show very varying performance levels on different data sets (Elgendi 2013, Liu et al 2018, Eilers et al 2021).This is due to the fact that algorithms are trained and evaluated often on single data sets or leads, leading to a bias when applied to signals measured from different leads or ECG devices.This poses the research question how robust detectors are on different leads and if there is an 'optimal' lead for a given detector which has been addressed in recent works (Eilers et al 2021, Vollmer andGuzman 2022).
Another use case is the full delineation of an ECG wave, i.e. the detection of its on-and offset, next to the peak.The accuracy in detecting these points is significantly lower compared to R-wave detection due to the lower amplitude of T-waves and the subtleness of these points.In the past, multiple algorithms have been proposed for this task which are based on different approaches such as wavelet theory (Martinez et al 2004), variable projections (Bock et al 2021), or hierarchical clustering (Chen and Maharatna 2020).
In this work, we address both issues from a new perspective by using polar coordinates of the 2D vector loop.In the radial part, called the 'radial lead', the peaks are well-pronounced and thereby a suitable candidate to enhance accuracy of detection of fiducial points.Building upon the introduced Cabrera Circle, we change the cartesic (I, −mVF) coordinates to polar coordinates and derive two new leads: + is always greater than or equal to the magnitude of the Cabrera function C F .This can be seen by considering the ith sample (I i , −mVF i ) ≕ u as a vector in a two-dimensional real-valued vector space (for the sign see footnote on page 8).The vector ( ( ) ( )) ( ( ) ( )) ≕ v cos , sin cos , sin a a a a --= is a unit vector (the sign is due to the clockwise convention).The projection of the row vector u onto v is therefore given by the scalar product u • v T , which is exactly the cabrera function C F defined in equation ( 22) and, in the case of integer multiples for α of 30 • , a member of the leads of the Cabrera sequence.Because of 1  , this is always smaller or equal in magnitude to the radial lead, i.e. |C F | r for all α.
Since the radial signal is always positive and larger than the absolute value of each member of the Cabrera Circle, this will also hold true for the extreme values of T, P or possibly U-waves with their respective EHAs.If the noise N of the signals I and mVF propagates comparable to the radial lead which depends among other things on the preprocessing, |C F |/N r/N is due to the above considerations.Thus, the radial signal is expected to optimize the signal-to-noise ratio for any extremum of the leads regardless of their instantaneous EHAs.
Using the Scientific compute cluster at GWDG (see acknowledgment) we process all signals of the LUDB.We use Python (v3.8) in combination with numpy (v1.20.1) and scipy (V.1.4.1) as glue code and the wfdb toolkit (v4.0.0) for data acquisition.Furthermore, we use the R-peak detector xqrs provided in this toolkit.We do not use the option for parameter learning and other provided detectors as they are not supported anymore.In addition, we use eleven R-peak detectors provided by the neurokit2 library (v.0.2.1) as depicted in table 2. For the delineation of the T-wave, we use all three methods provided by the library, namely neurokit2, neurokit2_cwt based on the continuous wavelet transform, and neurokit2_dwt based on the discrete wavelet transform.It has to be mentioned that only the wavelet-based methods are able to compute the onset of the T-wave.
We apply each method to each lead individually and also to the radial radial lead defined in equation (33).As threshold for a successful detection we define a tolerance of 25 samples (50 ms) centered on the ground truth peak, onset, or offset sample.Based upon that, we compute sensitivity (SEN), positive predictive value (PPV), and F1 score7 for each detector applied to each record and lead: with TP, FP, and P representing true positive detections, false positive detections, and the total number of ground truth annotations, respectively.

Results
3.1.Use case 1: An interactive tool for inspecting the ECG 2D vector loop and determining the electrical heart axis In the following, we show two example analysis acquired with the developed tool8 .The EHA's of the two examples are chosen such that one is in the normal range (figures 7, 8) and the other in the range, that would have been affected by the sign of the conventional equation (figures 9, 10).
The plots shown on the right side use the angle for projection of the vector loop as free parameter, so any angle can be chosen.
The first signal (PTB-XL: 00553_hr) stems from a healthy subject with sinus rhythm with the corresponding metadata being shown in table 3.In order to compare the conventional presentation of 12-lead ECG with the novel plots, we show the signals versus time in figure 6.The natural order of the Cabrera-sequence in the first  column allows an intuitive understanding of the cardiac activity.However, there is no continuous transition between the limb leads and the observer has to inspect multiple leads visually at once.Note, that the precordial leads are not used in the interactive tool.
A screenshot of the interactive tool consisting of the 2D vector loops (left side) together with the signal projected on the EHA (right) is shown in figure 7. Figure 8 shows the same signal but with a projection perpendicular to the EHA.As can be seen, the signal on the right side has different characteristics with switched sign and suppressed T-waves.
The second signal (PTB-XL: 18680_hr) stems from a subject suffering from cardiac disease with the corresponding metadata being shown in table 4; the textual entries can be translated to 'sinus rhythm, overexcited right type, peripheral low voltage, nonspecific intraventricular conduction disturbance, qrs(t) abnormal, high lateral infarction' and 'unconfirmed report'.Two screenshots of the tool for the whole signal and for a 0.8 s excerpt are shown in figures 9 and 10, respectively.The last screenshot illustrates the usefulness of the black line segment to inspect individual vector loops such as the one representing T-wave.
The examples indicate, that there is a dependence of the EHA on the individual peak and the amount and type of noise in the data.

Use case 2: The radial lead for improving ECG processing
Regarding R-peak detection, figure 11 (left) shows the averaged F1 scores w.r.t.detector and lead with the radial lead being denoted 'rad'.As can be clearly seen, the 'xqr' detector outperforms all others having the highest median values and lowest standard deviation.Figure 11 (right) depicts the same visualization but with respect to the leads.On fourth position w.r.t.F1 score is the radial lead which is only outperformed by three precordial leads V4−V6 outperforming the other limb leads concerning median value.It also reaches high F1 scores within the upper quartile compared to the other limb leads.
In the appendix, table C1 shows all results including SEN, PPV, and F1 scores.Due to space limitations, we only show the 15 best-performing combinations according to F1 score.Similar to the results in figure 11, the precordial leads show highest scores.However, the radial lead (position 5, 7, 13) outperforms the other limb leads by improving SEN compared to the best limb lead on position 9 by 3.38%.Additionally, the combination of the radial lead with the 'neurokit' detector results in the highest SEN.As can be seen, the continuous wavelet transform-based method is outperforming the discrete wavelet transform-based method in every case.For T-peak and offset detection, the neurokit detector outperforms the other two, yielding F1 scores up to 0.79 (peak) and 0.78 (offset).
Figure 13 depicts the same visualization as in figure 11 (right) but for the detection of onset (left), peak (center), and offset (right) of T-waves.As can be seen, similar as for R-peak detection, the precordial leads achieve the highest F1 scores.For T-peak and offset detection, the radial lead is yielding the best results when compared to the other limb leads.For the onset the radial lead has a low accuracy in time.Tables C2, C3, and C4 contain quantitative results for the delineation of the T-wave.

Discussion
In this work, we built upon fundamentals of ECG acquisition and earlier work by many researchers.We combined that information to derive the Cabrera Circle (figure 5) which is based on a mathematical proper  'WPW': 100.0, 'ABQRS': 0.0, 'SR': 0.0 Heart axis: ARAD Figure 9. Screenshot of the interactive tool: in this example, the ECG signal of a patient suffering from cardiovascular disease is shown.
The atypical VCG loop is clearly visible and is projected on the right in RAD direction.
Figure 10.Screenshot of the interactive tool: the same data as in Figure 9, with the signal duration reduced to an interval of 0.8 s length.The right part is now the projection on the I-direction showing the two peaks of the QRS-complex and highlighting the peak of the T-loop (black line segment).
definition and enables the derivation of various leads: The interpolated ones based on the Cabrera function given in equation ( 22) and the radial one together with its angle defined in equation (33) in two dimensions.
4.1.The interactive tool for inspecting the ECG 2D vector loop and determining the electrical heart axis By publishing an interactive open-source tool, we demonstrated the potential of the Cabrera Circle for analysis of ECG signals.Using exemplary data provided by PTB-XL, we underline how it can be used to analyze ECG vector loops and how to determine the EHA intuitively.
Our motivation stemmed from the fact that vector loops are used in several textbooks on physiology as a theoretical concept, but to date no appropriate implementation is available.Next to EHA determination, the tools enables the analysis of the vector loops and thereby enables the manual search for novel ECG features within this two-dimensional representation.In appendix B we review some manual EHA determinations used in clinical practice.The advantage of our interactive tool is the visual control over the direction used for projection, e.g. over several peaks.Another advantage over some methods described in appendix B is, that the value is numerical and not categorical, i.e. it could be used for aggregation of large amount of heart beats within the same measurement.Thereby, the EHA could be characterized by mean and standard deviation of the aggregation, characterizing the whole measurement more accurate than a single value.
In future work, the tool could be extended to automated calculation of the EHA by combining it with a suitable peak detector.The radial lead could serve as an adequate choice for the limb leads, because it avoids the ambiguity of the time-stamps corresponding to peaks from different limb leads.
Another avenue for future work could be to add 3D visualizations.In Chiang et al (2001) it was shown, that they do not have to necessarily meet the needs of clinicians but this novel representation could be used to determine the EHA with a purely data-driven approach without human interaction.However, the EHA defined by equation (32) depends on the accuracy in time of the R-peak detector and it can be seen in the screenshots of the interactive tool (figures 7 or 9) that the EHA is depending on the type and amount of noise.Consequently, our next step will be to set up an appropriate combination of preprocessing algorithms, that allow an accurate and numerically stable determination of the EHA.

The radial lead for improving ECG processing
Regarding the use case of improving ECG processing, we applied several state-of-the-art detectors to approximately 22 000 heart beats provided by 12-lead LUDB (Kalyakulina et al 2020).R-peak detectors using the radial lead outperformed all other limb leads (I, II, III, aVR, aVL, aVF) and resulted in the highest SEN, even outperforming the some precordial leads (except for V5 and V6).These leads are especially suited for R-peak detection detection as they point, using the anatomical correspondence, towards typical EHAs.
Regarding the full T-wave delineation we applied three different detectors.Our results indicate that T-peak and offset detection is working quite accurately with the most suitable leads reaching F1 scores 0.7.The radial lead was again outperforming all other limb leads w.r.t.F1 score.The detection of the T-peak onset is working with only limited accuracy and large variance in results for the radial lead.One reason for that might be, that the radial lead is stronger affected by noise close to the baseline than close to the peaks or other extreme values of the limb leads.
We were suprised by the low accuracy of some detectors.On the one hand, we applied a rather strict evaluation by using a window of 50 ms for matching detected fiducial points to ground truth.Other research papers apply more generous window sizes, leading to improved evaluation metrics.On the other hand, algorithms for ECG processing are tested on a few established databases, e.g.MIT-BIH, the European ST-T (both can be found at (Goldberger et al 2000)), or the AHA database (which can be accessed upon request).However, these are typically 2-lead databases (Merdjanovska and Rashkovska 2022) in contrast to 12-lead ECG applied in this work.In addition, these conventional databases offer lower sampling rates compared to LUDB which might introduce another bias.Another major issue is the exact purpose of the algorithm under consideration and the evaluation methodology.It makes a difference, if the demand is (i) pure detection of an QRS complex (Kohler et al 2002), (ii) distinction to ectopic beats (Qiu et al 2022), (iii) a delineation of the whole waveform (Spicher and Kukuk 2020), (iv) or alignment of several heartbeats to average them (Gatzoulis et al 2018).As the algorithms applied were coming from different fields, this might introduce a further bias as the trade-off between sensitivity and accuracy in time might be different.
By inspecting some of our results, we found a majority of cases in which the rather low performance of individual detectors can be explained by the absence of preprocessing or parameter tweaking.By doing so, the accuracy might be increased in these cases.However, finding an 'optimal' configuration of a certain detector is not within the scope of this work as we wanted to analyze the 'out-of-the-box' performance without any manual adjustments.
In summary, the proposed method cannot be used to replace 12-lead ECG by 6-lead ECG but offers an easy way to improve detection of R-waves and T-wave delineation in case of 6-lead ECG.
A limitation of our work is that the processed LUDB is not balanced w.r.t.healthy volunteers and patients with the majority of ECG signals showing sinus rhythms (71.5%).However, the EHA is quite variable, being normal only in 37.5% and also showing left and right axis deviation, as well as vertical and horizontal EHAs.Thereby, we conclude that our results are generalizable to a certain extent for the data at hand.Experiments with more diverse databases are required to evaluate the performance on unseen data from other databases.
The proposed methodology bears potential for other ECG-related use cases.For example, the constraints given in equation (A2) could be used to check the similarity between any three leads from the 6-lead system.In future work, we will take the precordial leads into account in order to complete the spatial information of 12lead ECG.Furthermore, to look at some constraint-like properties, one has to consider the dipole-model of the heart as well as aspects of 3D-VCGs.As another avenue for future work, we will use the ECG signals and the metadata of the PTB-XL to analyze in how far this allows to detect leads affected by different types of noise.

Lessons learned
The theoretical part of this work was like resolving a historical puzzle as many references were hard to find.It is stirring, that the conversion factors (table 1) are in perfect agreement with the equilateral Einthoven triangle (figure 4): taking the side-length of this triangle as a = 1, the altitude (height) from any side is h a 3 2 = , which is the reciprocal of the conversion factor from Goldberger augmented leads to the Einthoven ones.The radius of the circumscribed circle is R a 1 3 = , which is-again-the reciprocal of the conversion factor from Wilson limb leads to the Einthoven ones.
Three electrodes attached to a bodies surface always form a planar triangle in space.No spatial metadata as coordinates appear in our equations, except the information R, L and F for the electrodes position, so that an equilateral triangle is the appropriate model.
Together with the definitions for the leads given in terms of potentials, the same constraints would appear when the leads are placed on other body positions as the usual ones, e.g. in a Mason-Likar setting.Although the constraints shown may be used to calculate leads from others, no electrode interchange can be detected using the constraints alone.For this purpose, other methods have to be applied before using the Cabrera Circle (Krasteva and Schmid 2019).

Conclusion
Except for some rare current occurrences (Dower et al 1990, Sgarbossa et al 2004, Case and Moss 2010, Lam et al 2015, Lindow et al 2019), neither the Cabrera sequence nor its extension to a circle seem to be in widespread use.We hope, that the proposed Cabrera Circle together with the open-source software provided given will help to further extend the use of this methodology.

Appendix A. The matrix of constraints
We start our analysis by the fact that the three potentials corresponding to the electrodes can be used as such a normal form for all voltages 10 .As they are based on the same electrical potentials, these general relationships also hold between any combination of Einthoven and Goldberger leads.To give an example, we seek for the constraint between the leads I, II and aVF.The procedure how to calculate this constraint is shown in table A1.
The number of combinations of distinct elements without repetition is given by the binomial coefficient, thereby there are possibilities of constraints.All constraints are presented as a matrix in equation (A2).
Each row of C denotes a constraint between three leads with the coefficients in each row are chosen to be integers with a greatest common divisor of one and the number of negative signs does not exceed one.For example, the 5th row of C can be interpreted as: which is equivalent to the example in table A1.
Table A1.The procedure how to calculate the constraint between I, II and aVF.The first three rows reflect the definitions (1), ( 2) and (10).The following two rows are linear combinations of the previous ones with a vanishing Φ R -component, namely I − II and I − 2 aVF.The last row is again a linear combination of rows four and five, and represents the desired constraint.
The first two rows are the same as equation (13).The other rows are grouped in series of three.Rows 3 − 5 express single Goldberger leads in terms of the Einthoven leads I and II.This is followed by single Goldberger leads being expressed in terms of II and III leads (rows: 6−8) and I and II leads (9−11).The rest of C has the same structure, but single Einthoven leads are expressed in terms of a combination of two Goldberger leads.The bold rows represent constraints, which can be used to express leads II, III, aVL, and aVR in terms of I and aVF (Macfarlane 2011), Lead Systems, p. 384.

Appendix B. Clinical methods to determine the electrical heart axis
In this chapter we review the basics of conventional determination of the EHA in clinical practice.To date, a clear standard for EHA calculcation is still lacking (Novosel et al 2021).
First, a simple estimate of the EHA can be obtained by looking at the leads of the left column in figure 6.By looking at the successive amplitudes, the EHA should be between −aVR (about 30 • ) and II (60 • ), i.e. in the normal range.However, this estimation is rather rough because the modification factor m 2 3 1.15 = » is missing which is an increase by 15%.If the axis to be estimated in this way is not in the range of the Cabrera sequence, an additional consideration of the signs of the R-peaks is necessary.
Second, somewhat more accurate, is a graphical solution as suggested in figure 4. For each Einthoven lead, the timestamps of the maximum values are obtained.Using the example of the R-peak near 5 s of the data set of figures 6, 7 and 8 the resulting values are shown in table B1.
For each of the lead combinations (I, II), (I, III) and (II, III) a heart axis can now be constructed or calculated.The three different results are shown in the figure 14.
As can be seen there is a certain discrepancy in the results which is a consequence of the fact that the three maxima do not satisfy the Einthoven equation equation (13).Namely, for the maxima I + III − II = 620 + 355 − 732 = 243 μV, which is not equal to zero.Due to the high frequency changes in the ECG signal in the neighborhood of the R-peak, even small deviations in peak detection lead to inaccuracy in detecting the EHA using this method.
Third, the analysis of the polarity in standard electrodes is, provided a good implementation, equivalent to the older implementations of atan2, which were also based on case distinctions.Such case distinctions, for instance represented by the '±' symbols in formulas [20]-[25] of (Novosel et al 1999), are difficult to implement correctly. 11The calculation method in the footnote on page 14 is preferable, because it needs no case distinctions.The latter is also suitable for estimates of the errors according to the error propagation law, for instance with computer algebra.By inserting appropriate values in the difference atan2(m•y, x)-atan2(y, x), the magnitude of the difference never exeeded 5°.Therefore, we agree with (Novosel et al 1999), that these differences rarely reach clinical significance.

Figure 2 .
Figure 2. The development from the Einthoven triangle (a) to the Cabrera sequence (b).Abbreviations: RA right arm, LA left arm, LL left leg, WCT Wilson central terminal.Note the use of non-augmented Wilson limb leads (VL, VR, VF) which were a precursor of the Goldberger augmented leads and the numbering in mathematical positive order.D1, D2, D3 are the Einthoven leads which are nowadays denoted I, II, III.

Figure 3 .
Figure3.The Cabrera sequence with respect to the basis (I, aVF).Note, that the y-axis points downwards.
Goldberger leads and its reciprocal value 2 3 vice versa.The latter is the conversion factor

Figure 4 .
Figure 4.The equilateral Einthoven triangle in terms of dimensionless leads i ≔ I/U0 w.r.t.point OI and ii ≔ II/U0 w.r.t.point OII.

Figure 5 .
Figure 5.The Cabrera sequence with respect to the basis

Figure 6 .
Figure6.The whole datset of the healthy subject in the Cabrera-order with the unmodified limb leads (first column) and the precordial leads (second column) as conventional time-series plots.

Figure 7 .
Figure7.Screenshot of the interactive tool: the left side shows the 2D loop visualization of an healthy ECG with a typical EHA.The right side shows the corresponding time-dependent signal projected along the red axis.The sample corresponding to the black line can be interactively chosen, the momentary values are in the title of the right plot.The colors are an orientation for the time which is covering here 10 s.In the header, T denotes the time stamp of the highlighted sample and A its amplitude. .

Figure 12
Figure12depicts the same visualization as in figure11(left) but for the detection of onset (left), peak (center), and offset (right) of T-waves.Only neurokit_cwt and neurokit_dwt are able to compute the T-wave onset.As can be seen, the continuous wavelet transform-based method is outperforming the discrete wavelet transform-based method in every case.For T-peak and offset detection, the neurokit detector outperforms the other two, yielding F1 scores up to 0.79 (peak) and 0.78 (offset).Figure13depicts the same visualization as in figure11(right) but for the detection of onset (left), peak (center), and offset (right) of T-waves.As can be seen, similar as for R-peak detection, the precordial leads achieve the highest F1 scores.For T-peak and offset detection, the radial lead is yielding the best results when compared to the other limb leads.For the onset the radial lead has a low accuracy in time.TablesC2, C3, and C4 contain quantitative results for the delineation of the T-wave.

Figure 8 .
Figure 8. Screenshot of the interactive tool: the same healthy subject as in figure 7 but the angle of the projection has been changed by the user, leading to the signal on the right being projected perpendicular to the EHA.

Figure 11 .
Figure 11.Boxplots depicting F1 scores for all QRS complexes within the LUDB w.r.t.detector (left) and lead (right).They are ordered by increasing medians.

Table 1 .
Conversion factors between limb lead systems.
).The Cabrera Circle in terms of linear algebra By multiplying the augmented leads with the introduced correction factor 2 3 and resorting into the order of the Cabrera sequence, we arrive at the final analytical expression of the Cabrera Circle

Table 2 .
Algorithms applied to LUDB for R-peak detection and T-wave delineation.

Table 3 .
Metadata for the dataset 00553_hr.

Table 4 .
The metadata for the dataset 18680_hr.

Table B1 .
The values of the Einthoven leads corresponding to the R-peak near 5 s of the healthy example.The respective maxima are in bold.The corresponding EHAs are shown in figure14; the instantaneous heart axes are given in the fifth column.Figure 14.The determination of the EHA from the maximum values of the Einthoven leads.It can be seen, that the three possible intersections result in numerically different heart axes.

Table C1 .
R-peak detection: 15 best combinations of leads and QRS detectors according to F1 score on LUDB.Bold values are maximum values in that column.Columns are sorted by detector w.r.t.figure 10 and leads in standard lead order with the 'rad' signal placed before the precordial leads.

Table C2 .
T onset detection: combinations of leads and T detectors with F1 > 0.6 on LUDB.Results are presented as in tableC1.

Table C3 .
T-peak detection: combinations of leads and T detectors with F1 > 0.7 on LUDB.Results are presented as in tableC1.