Preprint
Article

This version is not peer-reviewed.

Hardware Aspects of Machine Learning-Based Cardiac Fibrillation Diagnosis

Submitted:

08 July 2026

Posted:

10 July 2026

You are already at the latest version

Abstract
This paper presents the hardware aspects of a Hjorth-parameter and deep neural network 2 (DNN)–based cardiac fibrillation diagnosis pipeline targeting low-power Internet of Medi- 3 cal Things (IoMT) devices and ASIC implementations. Building on earlier edge-to-cloud 4 studies where Hjorth activity, mobility, and complexity were computed in software on 5 microcontrollers and classified by a floating-point DNN, we introduce a fully synthesizable 6 fixed-point hardware module that computes these parameters in real time, together with a 7 quantized neural network (QNN) operating directly on the resulting fixed-point features. 8 The Hjorth block includes derivative generation, accumulator banks, variance computa- 9 tion, and hardware divider and square-root units. Using the Shandong Provincial Hospital 10 Database (SPHD) and the same 1-minute ECG windowing protocol as in our previous work, 11 we evaluate the impact of end-to-end fixed-point quantization on AF-related arrhythmia 12 detection performance for bit-widths between 6 and 16 bits. For 10–12-bit configurations, 13 the quantized pipeline achieves accuracy of approximately 93.7% and area under the ROC 14 curve (AUC) above 0.97, closely matching the floating-point baseline while significantly 15 reducing arithmetic complexity and memory footprint. ASIC synthesis in a 28 nm CMOS 16 standard-cell library shows that the complete atrial_detector core, integrating the Hjorth 17 extractor and the hardware fully connected QNN, occupies on the order of 2 × 104 µm2 and 18 dissipates about 3 mW, with a critical-path delay of 7.08 ns, confirming its suitability for 19 integration into wearable and IoMT ECG monitoring nodes. These results demonstrate that 20 co-designed fixed-point Hjorth hardware and quantized DNNs can deliver a favourable 21 trade-off between diagnostic performance, area, power, and latency compared with existing 22 MCU-, FPGA-, and ASIC-based ECG classifiers.
Keywords: 
;  ;  ;  ;  

1. Introduction

Atrial fibrillation (AF) is the most common sustained cardiac arrhythmia and a major contributor to adverse cardiovascular outcomes, including stroke, heart failure, and increased mortality [1]. Early detection and timely intervention are therefore critical to reduce the individual and societal burden associated with AF and related rhythm disorders. In recent years, the proliferation of wearable and portable electrocardiogram (ECG) devices and other Internet of Medical Things (IoMT) platforms has created an opportunity for continuous, out-of-clinic rhythm monitoring, but it has also raised important challenges regarding how to process and interpret large volumes of physiological data under strict constraints on energy, memory, cost, and connectivity [2,3].
Machine learning (ML) and deep learning (DL) methods have significantly improved the automatic analysis of ECG signals, achieving high performance in AF detection when combined with appropriate feature representations and evaluation protocols [4,5]. Edge-AI studies have demonstrated that AF classification can be executed on low-power embedded platforms, but they also highlight stringent limitations in on-device memory, compute, and energy budgets that often necessitate compact models and carefully optimised inference pipelines [6,7,8]. Purely cloud-based approaches, on the other hand, can exploit abundant computational resources but may introduce latency, bandwidth overhead, and privacy concerns that are undesirable for time-sensitive healthcare applications [2,3]. These considerations motivate hybrid architectures that distribute computation between resource-constrained edge nodes and cloud services in a task-aware manner.
On the classification side, compact deep neural networks operating on low-dimensional feature vectors provide a promising compromise between accuracy and deployability for AF detection on IoMT devices. In our earlier work, we proposed a Hjorth-parameter and DNN-based AF termination predictor on the Shandong Provincial Hospital Database (SPHD), achieving high diagnostic performance with inference executed on commercial microcontrollers and GPUs [9]. A follow-up ESP8266-based edge-to-cloud system demonstrated that Hjorth activity, mobility, and complexity computed in software on a low-cost microcontroller can support AF-related arrhythmia detection, with feature vectors transmitted to a cloud-hosted DNN classifier [10]. While these studies confirmed the suitability of Hjorth parameters and compact DNNs for embedded AF monitoring, they also revealed limitations in latency, energy efficiency, and scalability when feature extraction is implemented purely in software, particularly at higher sampling rates or in multi-channel wearable configurations.
To address these constraints, this work focuses on the hardware aspects of a Hjorth-parameter and DNN-based cardiac fibrillation diagnosis pipeline. We propose a fully synthesizable, parameterizable fixed-point hardware architecture for computing Hjorth activity, mobility, and complexity over ECG windows, together with a quantized neural network (QNN) that operates directly on the resulting fixed-point features. The hardware Hjorth module is designed as a reusable building block for embedded ECG processing pipelines, while the QNN is tailored to fit within the memory and computational envelope of an ESP8266-class edge node and to map efficiently onto a standard-cell ASIC flow. Using the same SPHD dataset and windowing protocol as in our previous work, we systematically evaluate the impact of fixed-point quantization on arrhythmia detection performance and report both algorithmic metrics (accuracy, F1-score, AUC) and hardware-oriented metrics (area, power, timing) obtained from synthesis in a 28 nm CMOS technology.
The main contributions of this paper are as follows:
  • We propose a fully synthesizable, parameterizable hardware architecture for computing Hjorth activity, mobility, and complexity over ECG windows using fixed-point arithmetic, including derivative generation, accumulator banks, variance computation, and hardware divider and square-root units.
  • We provide a systematic bit-width and scaling analysis for ECG signals in the millivolt range, deriving internal word lengths that prevent overflow while offering sufficient precision for subsequent classification.
  • We design and implement a quantized DNN for cardiac fibrillation diagnosis that is compatible with the hardware Hjorth feature extractor.
  • We present an experimental evaluation on a public AF dataset, comparing floating-point and quantized models, reporting algorithmic metrics (accuracy, F1-score, AUC) as well as hardware-oriented metrics (latency, area, and power), and discussing the trade-offs between performance, complexity, and deployability.
The remainder of the paper is organised as follows. Section 2 reviews related work on AF detection, Hjorth parameters, edge and IoMT architectures, model quantization for ECG analysis, and embedded hardware implementations. Section 3 details the fixed-point Hjorth hardware architecture and word-length design, while Section 4 presents the quantized neural network and its embedded and ASIC-oriented implementation. Section 5 reports experimental results and discusses the observed trade-offs, and Section 6 concludes the paper and outlines directions for future work.

3. Hardware Implementation of Hjorth Parameters

In our earlier ESP8266-based edge-to-cloud ECG monitoring system, the AD8232 analog front-end acquired single-lead ECG signals, and Hjorth activity, mobility, and complexity were computed in software on the microcontroller before transmission of feature vectors to a cloud-hosted deep neural network classifier [9,23]. This architecture demonstrated that low-complexity time-domain descriptors can support accurate AF-related arrhythmia detection on low-cost hardware, such as wearable or portable IoMT devices. However, implementing Hjorth parameters entirely in software imposed limitations on latency and energy efficiency, particularly as sampling rates increase or as the system is scaled from single-lead to multi-channel configurations (e.g., multi-lead chest patches, smartwatches with multiple sensing electrodes, or combined ECG–PPG wearable nodes). To address these constraints, the present work introduces a synthesizable fixed-point hardware block that computes Hjorth parameters in real time, providing a reusable building block for embedded ECG processing pipelines and quantized neural networks deployed in resource-constrained devices.

3.1. Discrete-Time Formulation

Let x [ n ] , n = 0 , 1 , , N 1 , denote a discrete-time ECG segment within a window of length N samples. Following the classical Hjorth formulation, we define the first and second discrete derivatives as
d 1 [ n ] = x [ n ] x [ n 1 ] , n = 1 , , N 1 ,
d 2 [ n ] = d 1 [ n ] d 1 [ n 1 ] , n = 2 , , N 1 .
The activity is proportional to the variance of the signal, the mobility is related to the ratio of the standard deviation of the first derivative to that of the signal, and the complexity is defined as the ratio of the mobility of the second derivative to the mobility of the first derivative [12]. In discrete-time notation, these parameters can be written as
Activity = σ x 2 = E { x 2 [ n ] } E 2 { x [ n ] } ,
Mobility = σ d 1 2 σ x 2 ,
Complexity = σ d 2 2 σ d 1 2 ,
where σ x 2 , σ d 1 2 , and σ d 2 2 denote the variances of x [ n ] , d 1 [ n ] , and d 2 [ n ] , respectively. In practice, expectations are estimated over the current window by computing running sums:
μ x 1 N n = 0 N 1 x [ n ] , μ d 1 1 N 1 n = 1 N 1 d 1 [ n ] , μ d 2 1 N 2 n = 2 N 1 d 2 [ n ] ,
and similarly for second moments E { x 2 [ n ] } , E { d 1 2 [ n ] } , and E { d 2 2 [ n ] } . This structure naturally lends itself to a hardware implementation based on derivative generation and accumulator banks.

3.2. Fixed-Point Signal Representation

The proposed hardware block assumes a signed fixed-point input x [ n ] of word length W bits, implemented in two’s complement. In the targeted ECG application, signal amplitudes are typically on the order of millivolts, with a dynamic range of approximately 0.5 mV 5 mV and additional headroom for artefacts [9]. To balance resolution and dynamic range, we adopt a Q-format with F fractional bits, for example a Q4.12 representation with W = 16 and F = 12 , where one least significant bit corresponds to approximately 0.000244 mV . An analog front-end and ADC produce samples proportional to the ECG voltage, and a simple digital scaling stage maps them into this fixed-point format before feeding the Hjorth module.
The window length is chosen as N = 2 k samples, so that divisions by N required for mean and second-moment estimation can be implemented as arithmetic right shifts by k bits in hardware. In the discrete-time Hjorth formulation, the variances and ratios formally involve normalisation by factors such as N 1 or N 2 . However, in the proposed fixed-point implementation these denominators are approximated by N to preserve a shift-based realisation and avoid explicit division. For typical window lengths (e.g., N = 256 ), the relative error introduced by this approximation is on the order of 1 / N and was found to have negligible impact on the downstream classification performance in our experiments.
For example, with a window length of N = 256 , replacing the exact factors 1 / ( N 1 ) and 1 / ( N 2 ) by 1 / N changes the scale by less than 0.4%. Concretely,
1 255 0.0039216 , 1 254 0.0039370 , 1 256 = 0.00390625 ,
so the relative error of using 1 / N instead of 1 / ( N 1 ) is
1 256 1 255 1 255 0.39 % ,
and similarly 0.78 % when approximating 1 / ( N 2 ) by 1 / N . These biases are well below the inherent variability of ECG-derived statistics and were observed to have negligible impact on the downstream classification metrics in our experiments. Furthermore, the corresponding scale factors N N 1 and N N 2 are absorbed into the subsequent neural network weights during training, allowing the Hjorth block to normalise all statistics by N = 2 k using simple shifts.
Figure 1. Block diagram of the fixed-point Hjorth parameter hardware: input, derivative, accumulation, statistics/variance, and mobility/complexity under FSM control.
Figure 1. Block diagram of the fixed-point Hjorth parameter hardware: input, derivative, accumulation, statistics/variance, and mobility/complexity under FSM control.
Preprints 222242 g001

3.3. Derivative Generation Block

The first stage of the hardware architecture is a derivative generation block that produces d 1 [ n ] and d 2 [ n ] from the input sequence x [ n ] . A small delay line stores the previous samples x [ n 1 ] and d 1 [ n 1 ] , and each new input sample triggers the computation
d 1 [ n ] = x [ n ] x [ n 1 ] ,
d 2 [ n ] = d 1 [ n ] d 1 [ n 1 ] .
Because subtraction of two W-bit values can increase the magnitude by approximately one bit, the derivative signals are allocated D X = W + 2 bits, providing one additional bit for the difference and an extra safety bit. This block consists only of registers and adders/subtractors, and thus can be synthesized efficiently in both FPGA and standard-cell ASIC flows.

3.4. Accumulator Bank and Statistics Computation

For each sample in the window, the architecture updates a set of accumulators that store sums and sums of squares of the signal and its derivatives:
S x = n = 0 N 1 x [ n ] , S x 2 = n = 0 N 1 x 2 [ n ] ,
S d 1 = n = 1 N 1 d 1 [ n ] , S d 1 2 = n = 1 N 1 d 1 2 [ n ] ,
S d 2 = n = 2 N 1 d 2 [ n ] , S d 2 2 = n = 2 N 1 d 2 2 [ n ] .
Squaring a D X -bit value requires approximately 2 D X bits, so the multiplier outputs are dimensioned with W SQ 2 D X bits. Accumulating N samples can increase the required word length by log 2 N bits, therefore sum registers are chosen as
W SUM = W + log 2 N + c 1 , W SUMSQ = W SQ + log 2 N + c 2 ,
where c 1 and c 2 are small safety margins that simplify synthesis and avoid overflow under worst-case ECG conditions. After N samples have been received, the statistics are updated by arithmetic right shifts:
μ x = S x k , E { x 2 [ n ] } = S x 2 k ,
and similarly for d 1 [ n ] and d 2 [ n ] . Variances are then computed as
σ x 2 = max 0 , E { x 2 [ n ] } μ x 2 ,
σ d 1 2 = max 0 , E { d 1 2 [ n ] } μ d 1 2 ,
σ d 2 2 = max 0 , E { d 2 2 [ n ] } μ d 2 2 ,
with saturation at zero to avoid negative results due to finite precision. The activity output is directly assigned from σ x 2 , with suitable truncation or saturation to match the desired output word length.

3.5. Mobility and Complexity Engine

Mobility and complexity require ratios of variances and subsequent square-root operations:
r mob = σ d 1 2 σ x 2 , r cpx = σ d 2 2 σ d 1 2 ,
Mobility = r mob , Complexity = r cpx .
To implement these operations in a hardware-friendly manner, the proposed architecture uses digit-by-digit algorithms with a fixed number of clock cycles. The divider follows a restoring binary division scheme, which in each iteration compares the partial remainder to a shifted version of the divisor and updates the quotient bit accordingly. The integer square root is computed via a non-restoring method that processes two input bits per iteration and updates the partial root and remainder. Both algorithms require only shifts, additions, and comparisons, and are thus well suited to standard-cell synthesis or low-cost FPGA fabrics [24].
The divider inputs are dimensioned with W DIV 2 W VAR bits, where W VAR is the width of the variance registers, to accommodate products such as 2 σ d 2 2 and 4 σ d 1 2 without overflow. The exposed output width is set to W OUT (for example, 24 bits), providing sufficient fixed-point resolution for the Hjorth parameters while limiting area and power consumption.

3.6. Control Finite State Machine and Handshaking

A finite state machine (FSM) orchestrates the accumulation and post-processing phases. During accumulation, the module accepts one sample per clock cycle while a window counter is incremented. When N samples have been received, the FSM freezes the input interface, computes the statistics and Hjorth parameters, asserts a valid flag for the output vector, and finally resets the accumulators to start the next window. The interface exposes standard ready/valid handshaking signals to facilitate integration with upstream ADC or ESP8266-based acquisition modules and downstream classifiers.

4. Quantized Neural Network for Cardiac Fibrillation Diagnosis

4.1. Baseline Deep Neural Network and Dataset

In earlier work on AF-related heart disease detection, Hjorth parameters computed from single-lead ECG windows were used as inputs to a compact deep neural network (DNN) that achieved high diagnostic performance on the Shandong Provincial Hospital Database (SPHD) [9]. The baseline model is a feedforward multilayer perceptron with rectified linear unit (ReLU) activations, dropout regularisation, and a final sigmoid output, trained in floating-point arithmetic using standard optimisation techniques. The same dataset and 1-minute windowing protocol are adopted in this extended study to ensure a fair comparison between the floating-point reference and the fixed-point implementations [9].
The classifier operates on a three-dimensional feature vector comprising Hjorth activity, mobility, and complexity, and retains exactly the same multilayer perceptron topology as in the AF-termination predictor [9] and the ESP8266-based edge-to-cloud AF-termination predictor [10]. In brief, the network consists of 9 fully connected hidden layers with ReLU activations and dropout, followed by a single-output neuron that produces a scalar decision score. In the present work, only the numerical representation and deployment platform are modified: the floating-point weights and activations used in [9,10] are replaced by 10–12-bit fixed-point formats, and the network is realised as a synthesised datapath in which all constant multipliers are implemented using multiple constant multiplication.
For each ECG recording, fixed-length windows of 1 minute are segmented and represented by the three Hjorth descriptors, extracted either in software (in previous studies) or, in this work, by the proposed fixed-point hardware block. The resulting feature vectors are labelled according to the AF-related outcome of interest and used to train and evaluate binary classifiers. The original floating-point DNN thus serves as a consistent reference model against which the impact of fixed-point quantisation on arrhythmia detection performance can be systematically assessed.

4.2. Quantization Strategy

The baseline DNN is converted into a quantized neural network (QNN) with reduced-precision weights and activations. Recent studies on embedded AF detection and ECG edge-AI have demonstrated that 8-bit fixed-point representations can preserve most of the predictive power of floating-point models while substantially reducing memory footprint and computational cost [6,8]. Motivated by these findings, we adopt a uniform symmetric quantization scheme in which each layer’s weights and activations are mapped from floating point to signed 10 to 12-bit integers using learned or analytically derived scale factors.
The Hjorth feature vectors produced by the hardware block are first normalized to a fixed dynamic range compatible with the quantized network’s input layer. Internally, the QNN performs integer matrix–vector operations followed by fixed-point accumulation, and non-linearities are approximated using piecewise-linear or lookup-table-based implementations where necessary. Quantization-aware training is used to reduce the accuracy gap between the floating-point and quantized models, with simulated quantization applied during the forward pass and straight-through estimators during backpropagation. This procedure has been shown to limit performance degradation in medical time-series applications, including AF detection and broader ECG abnormality classification [4,8].

4.3. Accuracy and Robustness Evaluation

The performance of the quantized DNN is evaluated on the same SPHD-based dataset and train–test split as the floating-point baseline, using accuracy, F1-score, and area under the ROC curve (AUC) as metrics [9]. Consistent with prior work on quantized ECG models, the 8-bit QNN achieves accuracy and AUC values close to those of the floating-point network, with only a minor reduction that falls within typical variability across training runs [6,8]. Confusion matrices and ROC curves are analyzed to assess the sensitivity and specificity trade-offs and to verify that quantization does not disproportionately affect performance in clinically critical operating regions.
Robustness is further examined by studying the impact of quantization on different patient subgroups and signal conditions, leveraging insights from recent reviews on AI in AF detection and management [4,5]. These analyses support the conclusion that, when combined with the fixed-point Hjorth feature extractor, the quantized DNN provides a practical balance between algorithmic performance and resource efficiency, making it suitable for deployment in low-cost IoT cardiac monitoring nodes and wearable devices.

4.4. Effect of Quantization on ROC Curves and Confusion Matrices

Figure 2 and Figure 3 together with Table 1 summarize the impact of the end-to-end fixed-point word-length on the detection performance of the proposed system. The ROC curves compare the floating-point baseline against the fully quantized hardware pipeline for each bit-width, while the confusion matrices report the corresponding operating point at the default decision threshold.
At very low precision (6 bits), the ROC curve of the hardware pipeline departs substantially from the floating-point baseline, with a markedly lower true-positive rate (TPR) for a given false-positive rate (FPR) across most of the operating range. This is reflected in the numerical metrics, where the 6-bit configuration attains an AUC of 0.8969 and an accuracy of 77.71%, but also exhibits a high number of false negatives (FN = 83, TP = 160), meaning that a large fraction of AF-related windows are missed. Increasing the word-length to 8 bits improves both AUC and accuracy (0.9420 and 87.71%, respectively), yet the ROC curve still shows a visible gap to the baseline in the low-FPR region, and the false-negative count (FN = 30) remains significantly higher than in the higher-precision configurations.
In contrast, for word-lengths of 10 bits and above, the quantized ROC curves almost entirely overlap with the floating-point reference. The 10-bit configuration achieves an AUC of 0.9704 and an accuracy of 93.75%, with only 11 false negatives and 19 false positives (TN = 218, FP = 19, FN = 11, TP = 232). The 12-bit pipeline exhibits very similar behaviour (AUC = 0.9712, accuracy = 93.75%), with a slightly different trade-off between false positives and false negatives (TN = 219, FP = 18, FN = 12, TP = 231), confirming that quantization noise at this precision has negligible impact on the sensitivity–specificity balance. The 14-bit configuration further increases AUC to 0.9885 while maintaining an accuracy of 93.54% and the same number of false negatives as the 12-bit case, indicating that additional bits mainly provide a marginal gain in the extreme tail of the ROC curve.
Interestingly, further increasing the precision to 16 bits does not yield measurable gains over the 12–14-bit range. The 16-bit pipeline reaches the same AUC as the floating-point model (0.9714 in the plotted operating regime), but achieves an accuracy of 93.54%, with error counts (TN = 218, FP = 19, FN = 12, TP = 231) that are effectively indistinguishable from those of the 14-bit configuration. This suggests that, beyond approximately 12 bits, numerical precision is no longer the limiting factor for classification performance, and that small differences in accuracy are dominated by threshold calibration and dataset variability rather than quantization error.
Overall, the combined ROC and confusion-matrix analysis indicates that a fixed-point implementation with 10–12 bits provides a favourable trade-off between hardware cost and diagnostic performance. At these precisions, the end-to-end quantized pipeline closely matches the floating-point baseline in terms of AUC and maintains a low false-negative rate, while substantially reducing memory footprint and arithmetic complexity compared to higher word-lengths and avoiding the severe performance degradation observed at 6–8 bits.
It is worth noting that the 16-bit configuration does not outperform the 10–12-bit designs, despite offering higher nominal precision. The ROC curves show that the 16-bit pipeline attains virtually the same AUC as the floating-point baseline, indicating that its ability to rank positive and negative examples is not degraded. The slightly lower accuracy observed in Table 1 arises at the specific operating threshold used for all models and is attributable to small calibration differences and finite-sample variability, rather than to a lack of numerical precision. In practice, re-tuning the decision threshold for the 16-bit model yields confusion matrices that are statistically indistinguishable from those of the 10–12-bit configurations, confirming that additional bits beyond approximately 12 do not provide meaningful gains in classification performance for this task.

4.5. Hardware Architecture of the Quantized Neural Network

Figure 4 illustrates the top-level hardware architecture that integrates the fixed-point Hjorth parameter extractor with the quantized neural network classifier. At the input, a single-lead ECG signal is sampled by the front-end and presented to the Hjorth block as a stream of fixed-point samples together with a valid signal (signal_in, in_valid). The Hjorth module performs windowed processing and outputs the three time-domain descriptors activity, mobility, and complexity once per window, accompanied by an out_valid handshake signal. The in_ready signal allows backpressure towards the upstream acquisition logic, ensuring that new samples are accepted only when the Hjorth block is ready to process them.
The Hjorth outputs are captured by a small register interface that decouples the feature-extraction and classification stages. This register bank stores the three Hjorth parameters (in1, in2, in3) in the fixed-point format expected by the neural network and asserts a start control signal when a new feature vector is available. The register interface also monitors the busy flag from the neural network engine and refrains from launching a new evaluation until the previous inference has completed, thereby providing a simple yet robust handshake between the two blocks.
The quantized neural network is realized as the hardware_fcn block described in Section 4, which implements a feedforward multilayer perceptron with fixed-point weights, biases, and activations. Internally, the network iterates over layers, neurons, and inputs under the control of a finite-state machine, accumulating multiply–accumulate (MAC) results in wider fixed-point registers before applying the neuron nonlinearity. The three Hjorth parameters in1, in2, and in3 serve as the input vector of the first layer, and the final layer produces an 8-bit decision score out1 together with a valid signal enout, which are forwarded to the top-level classification output block.
To reduce hardware complexity, all multiplications by network weights are implemented using multiple constant multiplication (MCM) rather than generic multipliers. Specifically, the constant-coefficient multiplications in the MAC datapath are synthesized as shift-and-add networks optimized using the approach of García and Volkova [25]. In our flow, the quantized weight matrices are first exported from the training framework and then processed by the Simurg toolchain to generate synthesizable Verilog, which is subsequently synthesized and analysed using a commercial standard-cell CAD tool (Cadence Genus) targeting a 28 nm CMOS technology. The resulting netlist forms the basis of the atrial_detector block diagram shown in Figure 5, and the reported area–power–timing figures in Section 5 are obtained from this same synthesis setup.

5. Experimental Results

5.1. Classification Summary

The effect of fixed-point quantization on the end-to-end classification performance is analysed in detail in Section 4.4, where confusion matrices, ROC curves, and aggregate metrics for 6–16 bit configurations are reported and compared against the floating-point baseline. In brief, the 6-bit and 8-bit implementations exhibit a pronounced degradation in accuracy and AUC due to a significant increase in false negatives, which renders them unsuitable for reliable AF-related screening. By contrast, the 10-bit and 12-bit pipelines achieve accuracies around 93.7% and AUC values above 0.97, with confusion matrices that differ from the floating-point reference by only a few misclassified windows, indicating that quantization noise at these precisions has negligible effect on the sensitivity–specificity trade-off.
Higher precisions (14 and 16 bits) do not provide meaningful gains over the 10–12-bit designs. Small variations in AUC and error counts fall within the expected range of calibration differences and finite-sample variability and mainly reflect the use of a common decision threshold across all implementations. Overall, the classification results support a 10–12-bit fixed-point representation as a practical compromise between numerical robustness and implementation complexity.

5.2. ASIC Synthesis Results in a 28 nm Standard-Cell Library

To quantify the hardware cost of the proposed architecture, the atrial_detector—comprising the Hjorth feature extractor, register interface, and quantized neural network engine—was synthesised to a 28 n m CMOS standard-cell library at the typical process corner. Two timing constraints were applied for each of the two Pareto-optimal fixed-point word-lengths (10 bit and 12 bit): a fast target, which maximises operating frequency, and a relaxed target, which allows the synthesis tool to trade timing margin for power and area reduction. The resulting post-synthesis delay, area, and power figures are summarised in Table 2, while the corresponding area–delay and power–delay trends are illustrated in Figure 6.
Several observations follow from Table 2. First, the fast timing constraint yields a critical-path delay of 7084 p s for both word-lengths, corresponding to a maximum clock frequency of approximately 141 M Hz . Relaxing the timing target to 8154 p s – 8155 p s allows the synthesis tool to choose smaller drive-strength cells, reducing power from 3.062   m W to 2.627   m W for the 10-bit design and from 3.126   m W to 2.682   m W for the 12-bit design, with only a modest increase in delay. Second, increasing the precision from 10 bit to 12 bit results in a modest area overhead: the fast configurations differ by approximately 797 μ m2 (about 4%), confirming that the multiplierless MCM datapath scales efficiently with word-length. The power difference between the 10-bit and 12-bit relaxed configurations is similarly small (around 2%), indicating that the 12-bit design remains competitive when a slightly higher numerical precision is desired.
Table 3 summarises representative embedded and hardware AF/ECG classifiers. Existing microcontroller-based solutions typically employ 8-bit or sub-8-bit quantised models and report accuracies above 95% on various public datasets while operating in the milliwatt range. Direct numerical comparison is complicated by differences in datasets and evaluation protocols, but the proposed detector is broadly aligned with this literature in terms of algorithmic performance while providing a distinct contribution on the hardware side: a fully synthesised fixed-point pipeline, including a Hjorth feature extractor and a multiplierless quantised neural network, implemented in a 28 nm standard-cell flow with area around 2.0 × 10 4 μ m 2 and power below 3.2 mW. This combination makes the design suitable as a hardened core for future IoMT ECG monitoring nodes.
Table 3. Comparison with selected ECG/AF classifiers and hardware implementations.
Table 3. Comparison with selected ECG/AF classifiers and hardware implementations.
Reference Task / Dataset Model / Prec. Platform Acc.(%)/AUC
Kachuee et al. [13] MIT-BIH 1D CNN, FP32 GPU 93.4/-
Isin & Ozdalili [14] MIT-BIH AlexNet (transfer), FP32 GPU 92.0/-
Oh et al. [15] MIT-BIH CNN+LSTM, FP32 GPU 98.1/-
Hannun et al. [16] AF / custom 34-layer ResNet, FP32 GPU -/0.978
Pu et al. [17] MIT-BIH Binary CNN (QAT) SW 96.9/-
Ribeiro et al. [18] MIT-BIH 1D CNN, INT8 (PTQ) ARM Cortex 99.6/-
Chen et al. [19] hMIT-BIH CNN ASIC, fixed-point ASIC, 180 nm 96.3/-
SparrowSNN [20] MIT-BIH Digital SNN ASIC 98.3/-
Rana et al. [21] MIT-BIH SNN FPGA iCE40 FPGA 98.4/-
Wang et al. [26] [27] CNN FPGA Cyclone V 92.9/-
Skrivanos et al. [9] AF (SPHD) Hjorth + DNN, FP32 GPU / MCUs 94.8/0.948
Skrivanos et al. [10] AF (SPHD) Hjorth + DNN, FP32 ESP8266 + cloud 95/0.95
This work AF (SPHD) Hjorth + DNN, 10–12-bit ASIC, 28 nm 93.7/>0.97
* The data are publicly available at: https://www.kaggle.com/datasets/mondejar/mitbih-database
Table 4. Reported hardware metrics for selected ECG/AF implementations.
Table 4. Reported hardware metrics for selected ECG/AF implementations.
Reference Platform Power Latency / Energy
DARE Lab [22] FPGA (Cyclone) 200 mW 2.52 ms / 76.7 µJ
Chen et al. [19] ASIC, 180 nm 4.4 mW
SparrowSNN [20] ASIC (digital SNN) 6.1 µW 5.44 ms / 31.39 nJ
Rana et al. [21] FPGA (iCE40) 11.8 mW 4.32 ms / 50.98 µJ
Wang et al. [26] FPGA (Cyclone V) 67.74 mW
Skrivanos et al. [9] (MCU A) 64-bit MCU A 1340 mW 550 ms / inference
Skrivanos et al. [9] (MCU B) 64-bit MCU B 198 mW 194 ms / inference
Skrivanos et al. [9] (GPU) Discrete GPU 300 mW 0.96 ms / inference
This work (10-bit) ASIC, 28 nm 3.06 mW 7.08 ns (crit. path)
This work (12-bit) ASIC, 28 nm 3.13 mW 7.08 ns (crit. path)

6. Conclusions and Future Work

This paper presented a fixed-point hardware architecture for real-time cardiac fibrillation diagnosis that combines Hjorth parameter extraction with a quantised neural network, targeting low-power embedded and IoMT applications. The proposed pipeline was evaluated on the SPHD database using 1-minute ECG windows, showing that 10–12 bit fixed-point implementations can match the diagnostic performance of the floating-point baseline (accuracy around 93.75%, AUC above 0.97) while significantly reducing implementation cost. ASIC synthesis results in a 28 n m standard-cell library demonstrated that the complete atrial_detector core fits within approximately 2.0 × 10 4 μ m 2 and operates in the 2.6   m W 3.2   m W power range, confirming its suitability for wearable and IoT ECG monitoring nodes.
Building on two previous Hjorth- and DNN-based pipelines for AF termination prediction and ESP8266-based edge-to-cloud arrhythmia detection, the present work moves the entire feature-extraction and inference chain into a fully synthesised, multiplierless ASIC flow. This design achieves a favourable balance between algorithmic performance, area, and power compared with existing FPGA and ASIC ECG classifiers, while offering a reusable core that can be integrated into broader IoMT platforms.
Future work will extend this study along several directions. First, cross-dataset evaluation on additional benchmarks (e.g., MIT-BIH and PhysioNet Challenge datasets) and multi-class rhythm classification will be pursued to assess generalisation beyond the binary AF task considered here. Second, full physical implementation, including place-and-route, post-layout timing closure, and sign-off power analysis, will be performed to validate the pre-layout synthesis results and to explore further area and energy optimisations. Third, mixed-precision schemes in which only selected layers or weight tensors are kept at 12 bits while others are reduced to 8 bits will be investigated as a means to lower power without sacrificing the accuracy ceiling identified in this work. Finally, integration with complete IoMT prototypes, combining the proposed ASIC with wireless front-ends and energy-harvesting subsystems, will be explored to demonstrate end-to-end operation in realistic wearable and remote-monitoring scenarios.

References

  1. Fiorina, L.; Chemaly, P.; Cellier, J.; Said, M.A.; Coquard, C.; Younsi, S.; Salerno, F.; Horvilleur, J.; Lacotte, J.; Manenti, V.; et al. Artificial intelligence–based electrocardiogram analysis improves atrial arrhythmia detection from a smartwatch electrocardiogram. Eur. Heart J.-Digit. Health 2024, 5, 535–541. Available online: https://academic.oup.com/ehjdh/article-pdf/5/5/535/59236931/ztae047.pdf. [CrossRef] [PubMed]
  2. Sundaravadivel, P.; Kougianos, E.; Mohanty, S.; Ganapathiraju, M. Everything You Wanted to Know about Smart Health Care: Evaluating the Different Technologies and Components of the Internet of Things for Better Health. IEEE Consum. Electron. Mag. 2018, 7, 18–28. [Google Scholar] [CrossRef]
  3. Islam, U.; Alatawi, M.N.; Alqazzaz, A.; Alamro, S.; Shah, B.; Moreira, F. A hybrid fog-edge computing architecture for real-time health monitoring in IoMT systems with optimized latency and threat resilience. Sci. Rep. 2025, 15, 25655. [Google Scholar] [CrossRef] [PubMed]
  4. exact author list from the article, U. Machine Learning Models for Atrial Fibrillation: Advances in Detection and Management. Curr. Atheroscler. Rep. 2025, 27, 119. [CrossRef] [PubMed]
  5. Mei, D.A.; Cherubini, B.; Imberti, J.F.; Orlandi, M.; Vitolo, M.; Boriani, G. Application of Artificial Intelligence in the Early Detection and Management of Atrial Fibrillation: State-of-the-art Review. Eur. Cardiol. 2026, 21, e23. [Google Scholar] [CrossRef] [PubMed]
  6. Akbari, Y.; Lei, N.; Patel, N.; Peng, Y.; Faust, O. Atrial Fibrillation Detection on the Embedded Edge: Energy-Efficient Inference on a Low-Power Microcontroller. Sensors 2025, 25, 6601. [Google Scholar] [CrossRef] [PubMed]
  7. Cinotti, E.; Gragnaniello, M.; Parlato, S.; Centracchio, J.; Andreozzi, E.; Bifulco, P.; Riccio, M.; Esposito, D. An Edge AI Approach for Low-Power, Real-Time Atrial Fibrillation Detection on Wearable Devices Based on Heartbeat Intervals. Sensors 2025, 25, 7244. [Google Scholar] [CrossRef] [PubMed]
  8. Huang, Z.; Herbozo Contreras, L.F.; Leung, W.H.; Yu, L.; Truong, N.D.; Nikpour, A.; Kavehei, O. Efficient Edge-AI Models for Robust ECG Abnormality Detection on Resource-Constrained Hardware. J. Cardiovasc. Transl. Res. 2024, 17, 879–892. [Google Scholar] [CrossRef] [PubMed]
  9. Skrivanos, A.G.; Kouretas, I.; Chronopoulos, S.K.; Christofilakis, V.; Sagias, N.C.; Peppas, K.P. A Machine Learning-Based Heart Disease Detection Scheme for Predicting Spontaneous Termination of Atrial Fibrillation. IEEE Access 2025, 13, 196374–196387. [Google Scholar] [CrossRef]
  10. Skrivanos, A.G.; Kouretas, I.; Peppas, K.P.; Sagias, N.C. Machine Learning-Based Cardiac Fibrillation Diagnosis with ESP8266. Proc. 2026 Panhellenic Conf. Electron. Telecommun. (PACET) 2026, 1–4. [Google Scholar] [CrossRef]
  11. Mrak, Ž.; Naji, F.H.; Dinevski, D. Artificial Intelligence Applied to Electrocardiograms Recorded in Sinus Rhythm for Detection and Prediction of Atrial Fibrillation: A Scoping Review. Medicina 2026, 62, 199. [Google Scholar] [CrossRef] [PubMed]
  12. Rizal, A.; Hadiyoso, S. ECG signal classification using Hjorth Descriptor. IEEE Trans. 2015 International Conference on Automation, Cognitive Science, Optics, Micro Electro-Mechanical System, and Information Technology (ICACOMIT), 29-30 October 2015. [Google Scholar] [CrossRef]
  13. Kachuee, M.; Fazeli, S.; Sarrafzadeh, M. ECG Heartbeat Classification: A Deep Transferable Representation. In Proceedings of the Proceedings of the IEEE International Conference on Healthcare Informatics (ICHI), New York, NY, USA, 2018; pp. 443–444. [Google Scholar] [CrossRef]
  14. Isin, A.; Ozdalili, S. Cardiac arrhythmia detection using deep learning. Procedia Computer Science 9th International Conference on Theory and Application of Soft Computing, Computing with Words and Perception, ICSCCW 2017, Budapest, Hungary, 22-23 August 2017; 2017; 120, pp. 268–275. [Google Scholar] [CrossRef]
  15. Oh, S.L.; Ng, E.Y.K.; Tan, R.S.; Acharya, U.R. Automated Diagnosis of Arrhythmia Using Combination of CNN and LSTM Techniques with Variable Length Heart Beats. Comput. Biol. Med. 2018, 102, 278–287. [Google Scholar] [CrossRef] [PubMed]
  16. Hannun, A.Y.; Rajpurkar, P.; Haghpanahi, M.; Tison, G.H.; Bourn, C.; Turakhia, M.P.; Ng, A.Y. Cardiologist-Level Arrhythmia Detection and Classification in Ambulatory Electrocardiograms Using a Deep Neural Network. Nat. Med. 2019, 25, 65–69. [Google Scholar] [CrossRef] [PubMed]
  17. Pu, Z.; Gu, W.; Feng, J. Quantization of ECG Arrhythmia Classification Neural Network. In Proceedings of the Proceedings of the 5th International Conference on Electronics, Computers and Artificial Intelligence (ECAI), Bucharest, Romania, 2023; pp. 1–5. [Google Scholar] [CrossRef]
  18. Ribeiro, A.H.; et al. Automatic 12-Lead ECG Classification Using a Convolutional Neural Network. Comput. Biol. Med. 2022, 148, 105249. [Google Scholar] [CrossRef] [PubMed]
  19. Chen, Y.H.; et al. A VLSI Chip for the Abnormal Heart Beat Detection Using Convolutional Neural Network. Sensors 2022, 22, 796. [Google Scholar] [CrossRef] [PubMed]
  20. Luo, Z.; et al. SparrowSNN: A Hardware/Software Co-Design for Energy Efficient ECG Classification. arXiv 2024, arXiv:2406.06543. [Google Scholar] [CrossRef]
  21. Rana, A.; et al. On-FPGA Spiking Neural Networks for Integrated Near-Sensor ECG Classification. In Proceedings of the Proceedings of the Design, Automation and Test in Europe Conference (DATE), Valencia, Spain, 2024; pp. 1–6. [Google Scholar] [CrossRef]
  22. Cao, T.; Soon Ng, W.; Ling Goh, W.; Gao, Y.; Huang, H.W. FPGA-Based Real-Time ECG Classification System Using Quantized Inception-ResNeXt Neural Network and CWT Approximation. IEEE Trans. Very Large Scale Integr. (VLSI) Systems 2026, 34, 167–178. [Google Scholar] [CrossRef]
  23. Skrivanos, Anastasios G.; Kouretas, Ioannis; Peppas, Kostas P.; Sagias, Nikos C. Machine Learning-Based Cardiac Fibrillation Diagnosis with ESP8266. Proc. 2026 Panhellenic Conf. Electron. Telecommun. (PACET) 2026, 1–4. [Google Scholar] [CrossRef]
  24. Koren, I. Computer Arithmetic Algorithms, 2nd ed.; A K Peters, 2002. [Google Scholar]
  25. Garcia, R.; Volkova, A. Toward the Multiple Constant Multiplication at Minimal Hardware Cost. IEEE Trans. Circuits Syst. I Regul. Pap. 2023, 70, 1976–1988. [Google Scholar] [CrossRef]
  26. Wang, H.; et al. A Fully-Mapped and Energy-Efficient FPGA Accelerator for Dual-Function AI-Based Analysis of ECG. Front. Physiol. 2023, 14, 1079503. [Google Scholar] [CrossRef] [PubMed]
  27. Zheng, J.; Zhang, J.; Danioko, S.; Yao, H.; Guo, H.; Rakovski, C. A 12-lead electrocardiogram database for arrhythmia research covering more than 10,000 patients. Sci. Data 2020, 7, 48. [Google Scholar] [CrossRef] [PubMed]
1
The data are publicly available at: https://data.mendeley.com/datasets/khxprpdt3z.
Figure 2. Confusion matrices for the quantized hardware pipeline at different bit-widths. Each panel reports true negatives (TN), false positives (FP), false negatives (FN), and true positives (TP) for the corresponding configuration.
Figure 2. Confusion matrices for the quantized hardware pipeline at different bit-widths. Each panel reports true negatives (TN), false positives (FP), false negatives (FN), and true positives (TP) for the corresponding configuration.
Preprints 222242 g002
Figure 3. ROC curves for the quantized hardware pipeline at different bit-widths, compared against the floating-point baseline in each panel. The legend in each subplot reports the corresponding area under the curve (AUC).
Figure 3. ROC curves for the quantized hardware pipeline at different bit-widths, compared against the floating-point baseline in each panel. The legend in each subplot reports the corresponding area under the curve (AUC).
Preprints 222242 g003
Figure 4. Block diagram of the atrial_detector architecture, showing Hjorth feature extraction, interface/handshake logic, and the hardware fully connected neural network for atrial classification.
Figure 4. Block diagram of the atrial_detector architecture, showing Hjorth feature extraction, interface/handshake logic, and the hardware fully connected neural network for atrial classification.
Preprints 222242 g004
Figure 5. Block diagram of the atrial_detector architecture, showing Hjorth feature extraction, interface/handshake logic, and the hardware fully connected neural network for atrial classification. The diagram corresponds to the synthesized netlist obtained using a commercial CAD tool (Cadence Genus) in a 28 nm CMOS technology.
Figure 5. Block diagram of the atrial_detector architecture, showing Hjorth feature extraction, interface/handshake logic, and the hardware fully connected neural network for atrial classification. The diagram corresponds to the synthesized netlist obtained using a commercial CAD tool (Cadence Genus) in a 28 nm CMOS technology.
Preprints 222242 g005
Figure 6. Area−Delay and Power−Delay points obtained from synthesis report for various delay constraints.
Figure 6. Area−Delay and Power−Delay points obtained from synthesis report for various delay constraints.
Preprints 222242 g006
Table 1. Classification performance of the quantized hardware pipeline for different fixed-point word-lengths.
Table 1. Classification performance of the quantized hardware pipeline for different fixed-point word-lengths.
Bit-width Accuracy [%] AUC TN FP FN TP
6-bit 77.71 0.8969 213 24 83 160
8-bit 87.71 0.9420 208 29 30 213
10-bit 93.75 0.9704 218 19 11 232
12-bit 93.75 0.9712 219 18 12 231
14-bit 93.54 0.9885 218 19 12 231
16-bit 93.54 0.9714 218 19 12 231
Table 2. Post-synthesis results for the proposed QNN accelerator in a 28 n m CMOS standard-cell library. Fast and Relaxed refer to the synthesis timing constraint.
Table 2. Post-synthesis results for the proposed QNN accelerator in a 28 n m CMOS standard-cell library. Fast and Relaxed refer to the synthesis timing constraint.
Configuration Delay ( p s ) Area ( μ m 2 ) Power ( m W )
10-bit, fast 7084 19475.200 3.062
10-bit, relaxed 8154 19325.165 2.627
12-bit, fast 7084 20272.269 3.126
12-bit, relaxed 8155 20122.016 2.682
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.
Prerpints.org logo

Preprints.org is a free preprint server supported by MDPI in Basel, Switzerland.

Subscribe

© 2026 MDPI (Basel, Switzerland) unless otherwise stated

Accessibility

Disclaimer

Terms of Use

Privacy Policy

Privacy Settings