A co-simulation framework for biosensor modeling and real-time signal processing: integration of COMSOL and CODIS+
- Published
- Accepted
- Received
- Academic Editor
- Giovanni Angiulli
- Subject Areas
- Algorithms and Analysis of Algorithms, Embedded Computing, Optimization Theory and Computation, Real-Time and Embedded Systems, Scientific Computing and Simulation
- Keywords
- Co-simulation, Biosensor modeling and simulation, COMSOL, CODIS+, Worst-case execution time (WCET) estimation
- Copyright
- © 2025 Alshaya et al.
- Licence
- This is an open access article distributed under the terms of the Creative Commons Attribution License, which permits using, remixing, and building upon the work non-commercially, as long as it is properly attributed. For attribution, the original author(s), title, publication source (PeerJ Computer Science) and either DOI or URL of the article must be cited.
- Cite this article
- 2025. A co-simulation framework for biosensor modeling and real-time signal processing: integration of COMSOL and CODIS+. PeerJ Computer Science 11:e3372 https://doi.org/10.7717/peerj-cs.3372
Abstract
The accurate and efficient simulation of biosensors is essential for applications in healthcare, environmental monitoring, and diagnostics. This study presents a co-simulation framework integrating COMSOL Multiphysics and Continuous DIscrete Simulation (CODIS+), enabling a synchronized and multi-domain simulation approach to enhance the accuracy and execution time estimation of biosensor systems. The proposed framework leverages COMSOL for high-fidelity multiphysics modeling of biosensor behavior and CODIS+ for real-time signal processing, incorporating a 1D Convolutional Neural Network (CNN) for advanced noise reduction. Furthermore, Worst-Case Execution Time (WCET) estimation is implemented to ensure predictable real-time performance, relying on profiling tools within SystemC and CODIS+. Unlike traditional standalone simulations, the proposed framework eliminates iterative feedback between control and physical modeling, optimizing computational efficiency while maintaining high detection accuracy. A high-fidelity COMSOL model is used as the reference for validation due to the absence of experimental data, ensuring a reliable benchmark for performance evaluation. The framework achieves a low Execution Time Error (ETE) of approximately 4%, validating the precision of execution time estimation and ensuring computational predictability. Performance evaluation is conducted using Root Mean Square Error (RMSE) and Signal-to-Noise Ratio (SNR) metrics. The proposed approach achieves a significant reduction in RMSE (from 7.8 to 2.1) and outperforms traditional noise reduction techniques in terms of SNR improvement, demonstrating its effectiveness in preserving biosensor signal integrity. These results confirm that integrating physics-based modeling with AI-driven noise filtering enhances both biosensor signal accuracy and real-time feasibility. The validation presented in this study is based solely on simulation and profiling results; hardware-level testing is planned for future work. The proposed co-simulation framework presents a scalable and reliable solution for optimizing biosensor design and real-time signal processing, ensuring its applicability in critical biomedical and environmental monitoring applications. It underscores the extensibility, modularity, and reusability of our integration approach, allowing other COMSOL models and CODIS+ functionalities to be easily incorporated and customized.
Introduction
The development of accurate and efficient biosensors is crucial for applications in healthcare, environmental monitoring, and diagnostics. To predict biosensor behavior under real-world conditions, researchers often rely on simulations (Thriveni & Ghosh, 2022). However, discrepancies frequently arise between simulated outcomes and actual performance post-implementation. These differences can stem from oversimplified models, unaccounted environmental factors, or limitations in the simulation tools themselves (Thriveni & Ghosh, 2022; Zhang et al., 2021). For instance, studies have shown that while simulations may predict ideal sensor responses, real-world tests often reveal deviations due to factors like unmodeled noise or material imperfections (Shahbazi et al., 2021). These inconsistencies underscore the need for more comprehensive simulation approaches that bridge the gap between theoretical predictions and practical performance. One promising solution is the development of co-simulation models that integrate multiple simulation platforms, each specializing in different aspects of the biosensor system. By combining tools that handle continuous physical processes with those that manage discrete events, co-simulation can provide a more holistic representation of biosensor behavior. However, creating such integrated frameworks presents challenges, particularly in accurately estimating execution times. Traditional simulation tools may not account for the complexities introduced by co-simulation, leading to potential errors in timing predictions. Accurate execution time estimation is vital, especially for real-time applications where delays can significantly impact performance (Abdallah, 2021).
This study investigates whether integrating COMSOL Multiphysics with the CODIS+ co-simulation environment can effectively enhance biosensor signal accuracy and enable reliable real-time execution time estimation.
This article aims to develop an advanced framework that enables a comprehensive and accurate simulation of biosensor systems, integrating multiple computational approaches to capture both the physical and biochemical dynamics involved.
The remainder of this article is organized as follows: ‘Background and Related Work’ provides an overview of relevant literature, methodologies, and theoretical frameworks. ‘Proposed Co-simulation Framework’ introduces the proposed integration and detailed approach. ‘Materials and Methods’ describes the co-simulation mechanism details. ‘Results’ presents the performance evaluation and ‘Discussion’ discusses the results, highlighting improvements in traditional methods and demonstrating the real-time feasibility of the proposed approach. Finally, ‘Conclusions’ concludes the article and outlines potential directions for future research.
Background and related work
In the literature, various attempts have been made to address the challenges of integrating diverse simulation tools and accurately estimating execution times in complex systems. One notable development is the Functional Mock-up Interface (FMI) standard, which facilitates interoperability between different simulation tools, enabling co-simulation of complex systems. FMI defines a standardized interface for exchanging dynamic models, allowing various simulation environments to interoperate seamlessly. This standard supports both model exchange and co-simulation, providing a framework for integrating components from different tools into a cohesive simulation environment. While FMI is a robust standard facilitating co-simulation, our integrated approach extends beyond FMI by providing specialized real-time execution profiling and noise-reduction capabilities, directly addressing the complexity inherent in biosensor signal processing that traditional FMI approaches alone cannot adequately resolve (Baronas, Ivanauskas & Kulys, 2021; Ferreira et al., 2003; Dagan & Bercovici, 2014; Sheeparamatti et al., 2006).
Additionally, methodologies have been proposed for estimating execution time probability distributions in component-based real-time systems, aiming to predict system performance without full access to component internals. For instance, a study by Perrone et al. (2009) introduces a methodology that estimates execution time distributions by analyzing the interactions between components, even when their internal code is inaccessible. This approach involves conducting experiments with components implemented over platforms like CIAO and ARCOS, and estimating related probability distributions to aid in verifying the timeliness of component-based systems.
Traditional methodologies for computing the Worst-Case Execution Time (WCET) of programs form the foundation of real-time system analysis, ensuring that time-critical tasks meet their deadlines. These methodologies can be broadly classified into static analysis and measurement-based techniques, each with distinct advantages and limitations (Meng, Sun & Wang, 2020).
Static analysis involves analyzing the program’s code without executing it to estimate an upper bound on its execution time. This method relies on detailed knowledge of the program’s control flow and the target hardware architecture, including pipeline behavior and cache hierarchies. By constructing models of hardware performance, static analysis attempts to account for all possible execution paths. However, accurately modeling modern processors’ advanced features often proves challenging, leading to conservative and overly pessimistic WCET estimates, especially in systems with dynamic behaviors (Hansen, Hissam & Moreno, 2009).
Measurement-based analysis, on the other hand, determines WCET by executing the program on the actual hardware and recording the observed execution times. This empirical approach benefits from using real-world data, yielding WCET estimates that closely reflect the hardware’s performance. However, this method’s accuracy depends on the comprehensiveness of the test cases, as it is practically impossible to explore all execution paths. Consequently, measurement-based techniques may underestimate the true WCET, posing potential risks in safety-critical systems where strict timing guarantees are required (Agrawal & Baruah, 2018).
Both approaches face significant challenges when applied to modern processors with complex architectural features such as branch prediction, out-of-order execution, and shared resources, which introduce variability in execution times. Despite these challenges, traditional WCET estimation methods remain pivotal in ensuring predictable performance in real-time systems. Future research is directed at combining these methods with emerging technologies, such as machine learning and hybrid techniques, to enhance accuracy and reliability (Jimenez Gil et al., 2017).
Kumar, Ranjbar & Kumar (2024) proposed a novel machine learning-based technique to estimate the WCET of GPU kernels by analyzing source applications and training models on large datasets, leveraging Nvidia’s Multi-Process Service to measure interference from co-running applications. Compared to traditional approaches, the proposed method achieves a 99% reduction in estimation time, with minimal resource consumption, while ensuring predicted WCETs are consistently higher than observed execution times, demonstrating its reliability and efficiency.
Despite these advancements, achieving low-error execution time estimation in co-simulation frameworks remains an open research area. The complexity of integrating multiple simulation tools, each with its own execution semantics and performance characteristics, poses significant challenges. Accurately predicting the overall system performance requires not only robust interoperability standards like FMI but also sophisticated methodologies for execution time estimation that can account for the intricacies of component interactions and the variability inherent in real-time systems. Further exploration and development in this field are essential to enhance the reliability and efficiency of simulations, particularly for applications such as biosensor systems where precise timing is critical.
Proposed co-simulation framework
Implementing a co-simulation between Simulink and COMSOL for a biosensor system is a robust approach that goes beyond verification, providing a comprehensive framework for both accurate system modeling and real-time execution time estimation. This integration leverages the strengths of both platforms: Simulink excels in dynamic system simulation and control logic, while COMSOL offers precise multiphysics modeling and numerical analysis. By combining these tools, co-simulation enables a more holistic representation of the biosensor, capturing both the physical phenomena (e.g., antigen-antibody binding, electrical impedance changes) and the system-level dynamics (e.g., signal processing, noise filtering).
From a verification standpoint regarding our recent advancements in designing a SiNW-FET biosensor for detecting airborne viruses (Hadded, Ayed & Alshaya, 2024, 2025), the integration of CODIS+ into the co-simulation framework ensures that the biosensor model behaves as expected under diverse operating conditions. In this article, CODIS+ environment ensures the integration of Simulink for high-level modeling, SystemC for event-driven execution profiling, and an FPGA-based emulator (DE2-115) for real-time validation. This co-simulation approach ensures both computational efficiency and real-world applicability.
The physical part of the biosensor, considered a continuous model, is simulated using COMSOL to capture detailed physical interactions, such as impedance changes and antigen-antibody binding, and their impact on sensor performance. Simulink/MATLAB is employed to simulate the hardware (HW) amplifier architecture, validating signal processing tasks and supporting the computational flow. Additionally, the noise-reduction process, based on a 1D-CNN algorithm, is emulated in an FPGA, enabling a more realistic representation of the hardware implementation. CODIS+ provides a robust communication and synchronization layer, ensuring seamless integration across these components. This multi-layered approach allows engineers to detect discrepancies in both the physical and computational layers of the biosensor, thereby improving model accuracy and robustness. Furthermore, the ability to test under varying environmental and operational scenarios in real-time enhances confidence in the sensor’s reliability and adaptability.
The co-simulation framework is also instrumental in estimating real execution time, a critical metric for real-time biosensing applications. In this setup, COMSOL generates time-resolved data reflecting the physical phenomena of the biosensor. Simulink/MATLAB models the HW amplifier pipeline, including data acquisition and processing, while the FPGA emulates the 1D-CNN algorithm responsible for enhancing the signal by reducing noises. CODIS+ synchronizes these components effectively, reflecting real-world delays introduced by hardware constraints, solver execution times, and algorithmic complexities. By capturing and aligning these processes within the CODIS+ environment, the simulation provides precise measurements of the total execution time, including delays caused by event-triggered responses.
The integration of continuous physical modeling in COMSOL, computational simulation in Simulink/MATLAB, and hardware emulation in FPGA ensures that the co-simulation accurately represents real-world biosensor dynamics.
In this study combining CODIS+ environment with WCET methods to confirm analysis across the communication, synchronization, and task execution layers, ensuring precise real-time performance by profiling and bounding delays for each component, including COMSOL, MATLAB, and FPGA. By dynamically adapting time steps and leveraging fault-tolerant mechanisms, the solution guarantees accurate real-time execution while reflecting real-world scenarios, making it highly reliable for biosensing applications. These insights guide optimization efforts, ensuring that the biosensor meets stringent real-time requirements for applications such as point-of-care diagnostics and environmental monitoring, while establishing a foundation for scalable and reliable biosensor systems.
The development and simulation of biosensors require sophisticated computational tools capable of modeling biochemical interactions, signal transduction, and system-level integration. Several software platforms have been developed to facilitate these processes, each with unique advantages tailored to specific aspects of biosensor design and validation.
COMSOL is a comprehensive multiphysics simulation platform that enables the modeling of various physical and chemical phenomena, including those relevant to biosensor applications. It offers specialized modules, such as the Chemical Reaction Engineering Module, which supports mass transport modeling, surface reaction analysis, and electrochemical interactions essential for biosensor functionality. A significant advantage of COMSOL is its ability to integrate multiple physics-based models into a single simulation, making it ideal for studying complex biosensor interactions. Moreover, its support for custom simulation applications allows researchers and engineers to create tailored solutions, even without extensive simulation expertise, enhancing accessibility and usability (Kumar et al., 2022).
Ansys Lumerical provides a powerful suite of optical simulation tools designed for predicting light interaction with biosensors at micro and nanoscale levels. The platform enables the design of periodic nanostructures, optimization of biosensor materials, and simulation of plasmonic and photonic interactions. These features are particularly beneficial for optical biosensors, including surface plasmon resonance (SPR) and fluorescence-based systems, as they allow precise modeling of light-matter interactions. The primary strength of Ansys Lumerical lies in its ability to enhance biosensor design efficiency and optimize sensor performance, making it a preferred choice for researchers in photonics-based biosensing technologies (Didari-Bader, Pelton & Estakhri, 2024).
SensBio is an open-source computational toolbox specifically developed to assist in the design of transcription-factor-based biosensors. The platform provides a suite of bioinformatics tools that model genetic regulatory circuits, enabling the design and optimization of biosensors that rely on synthetic biology approaches. One of the key advantages of SensBio is its focus on genetic circuit interactions, allowing researchers to fine-tune biosensor response mechanisms through computational simulations before physical prototyping. This feature is highly relevant in the field of molecular and cellular biosensors (Tellechea-Luzardo et al., 2023).
Developed by Dassault BIOVIA, Discovery Studio is a molecular modeling and simulation platform that facilitates the design of small-molecule and macromolecule biosensors. The software suite incorporates a range of computational techniques, including molecular mechanics, molecular dynamics, and quantum mechanical simulations, making it an essential tool for analyzing biomolecular interactions in biosensors. Discovery Studio’s main advantage is its high-resolution molecular modeling capabilities, which enable researchers to study protein-ligand interactions and optimize biosensor specificity at the molecular level. This makes it particularly useful for the development of enzyme-based and antibody-based biosensors (Pawar & Rohane, 2021).
Sim4Life is an advanced biomedical simulation platform that integrates computer-aided design (CAD), multiphysics solvers, medical-image-based modeling, and physiological tissue simulations. The software is extensively used in personalized medicine applications and for optimizing the performance of medical devices, including biosensors. One of its primary advantages is its capability to simulate real-world physiological conditions, allowing for the assessment of biosensor safety and efficacy in biological environments. Additionally, Sim4Life is particularly well-suited for implantable and wearable biosensors, as it can model interactions between biosensors and biological tissues, improving device design and validation (Chavannes et al., 2016).
Simcenter Amesim, developed by Siemens Digital Industries Software, is a multi-domain system simulation software that supports the modeling and analysis of mechatronic systems, including biosensor components. It provides libraries for various physical domains, enabling system-level analysis and co-simulation. The primary advantage of Simcenter Amesim is its ability to integrate multiple physical and control subsystems, making it particularly useful for lab-on-chip and microfluidic biosensor systems. By facilitating virtual prototyping, it reduces the need for extensive experimental testing, thereby accelerating biosensor development cycles (Fresia & Rundo, 2021).
Optimus, developed by Noesis Solutions, is a Process Integration and Design Optimization (PIDO) platform that allows the integration of multiple engineering software tools into a unified automated workflow. The platform is designed to optimize biosensor performance and reduce design iteration times by enabling parametric analysis and automated design exploration. One of its most significant advantages is its capability to streamline biosensor design optimization, ensuring improved sensitivity, selectivity, and reliability. By leveraging automated workflows, Optimus significantly enhances biosensor performance evaluation, making it a valuable tool in biosensor industrialization and mass production (Choi et al., 2015).
Each of these computational platforms offers distinct advantages tailored to specific aspects of biosensor design, modeling, and optimization. COMSOL and Ansys Lumerical are particularly beneficial for multiphysics and optical simulations, respectively, making them ideal for modeling the physical and electrochemical properties of biosensors. SensBio and Discovery Studio cater to biomolecular and genetic circuit-based biosensors, supporting advancements in synthetic biology and molecular diagnostics. Sim4Life is particularly valuable for biomedical and implantable biosensor applications, while Simcenter Amesim provides a multi-domain system simulation environment suitable for lab-on-chip and mechatronic biosensors. Lastly, Optimus enhances the biosensor development process by integrating design automation and optimization strategies, improving efficiency in biosensor industrialization.
Table 1 compares the proposed CODIS+–COMSOL co-simulation framework against several key approaches from the literature. It highlights (1) how FMI-based methods (Functional Mock-up Interface) offer standard tool interoperability but lack built-in real-time profiling; (2) classical WCET estimation techniques—static vs measurement-based—each trade off between conservatism and empirical coverage; and (3) emerging machine-learning approaches like those applied to GPU kernels, which reduce estimation time but often lack formal safety guarantees. In contrast, our framework integrates physical modeling, signal processing, and hardware-aware WCET profiling into a unified simulation pipeline, explicitly addressing both signal accuracy and execution predictability in a biosensor context.
| Feature/Criteria | Proposed framework (COMSOL + Simulink + CODIS+) | FMI standard-based approaches | Static WCET estimation | Measurement-based WCET estimation | ML-based WCET estimation (Kumar, Ranjbar & Kumar, 2024) |
|---|---|---|---|---|---|
| Tool integration | Deep integration of COMSOL, Simulink, SystemC, FPGA | General interoperability, lacks hardware-specific profiling | Not integrated with physical modeling | Requires physical testing setup | Needs large datasets, mainly for GPU |
| Real-time profiling | CODIS+ based profiling with event-driven WCET and ETE | No native support | Conservative, theoretical | Empirical but lacks coverage guarantees | Accurate on average, low WCET guarantee |
| Biosensor physical modeling | COMSOL for high-fidelity physical simulation | Not included (tool-agnostic) | Not supported | Not supported | Not supported |
| Noise reduction support | FPGA-based 1D CNN for signal denoising | Not supported | Not applicable | Not applicable | Not supported |
| FPGA emulation/Hardware awareness | DE2-115 FPGA with SystemC-based execution profiling | Not supported | Requires detailed hardware models | Requires target hardware | Targeted to GPU, not FPGA or embedded |
| Execution time estimation accuracy | <4% ETE in simulation | N/A | Pessimistic estimates | Risk of underestimation | High accuracy, application-specific |
| Application focus | Biosensor (SiNW-FET) with real-time constraints | Generic systems | General-purpose embedded systems | General-purpose embedded systems | GPU workloads, real-time applications |
| Strengths | Combines physical realism + execution profiling | Flexibility, tool-neutral integration | Formal upper bound guarantee | Reflects actual performance | Fast estimation with good accuracy |
| Limitations | No experimental validation yet (simulation-based) | No real-time profiling | Overly conservative | Needs exhaustive tests | Needs data + limited to known workloads |
The availability of diverse computational tools has significantly improved the ability to design, simulate, and optimize biosensors across various domains. By leveraging specialized simulation environments, researchers and engineers can efficiently develop biosensors with enhanced performance, reduced prototyping costs, and improved real-time applications. The selection of an appropriate simulation tool depends on the specific biosensor application, whether it be biochemical detection, optical sensing, molecular interactions, or mechatronic integration. The continuous advancement of these tools will play a crucial role in accelerating biosensor innovation and deployment in healthcare, environmental monitoring, and industrial applications.
Materials and Methods
The design of a biosensor remains a significant challenge, particularly when aiming to develop and verify the complete architecture at an early stage, encompassing both design and simulation. A biosensing system is inherently heterogeneous, as it integrates both continuous physical behavior and discrete event-driven states. Traditional design approaches often struggle to effectively simulate such complex interactions, leading to discrepancies between theoretical performance and real-world implementation. This article proposes an advanced methodology for biosensor system simulation, leveraging specialized simulators for each module to ensure accurate modeling and performance validation. By systematically integrating COMSOL, Simulink, and FPGA processing, we establish a multi-domain co-simulation framework that captures the physical, electrical, and computational aspects of the biosensor system. Additionally, we introduce an execution time estimation model to evaluate the efficiency of the system under real-time constraints. This approach provides a comprehensive toolset for early-stage validation, enabling precise performance assessment before physical prototyping.
This article presents a Co-Simulation framework integrating CODIS+ and COMSOL, as illustrated in Fig. 1, to enable a comprehensive and synchronized simulation of biosensor systems.
Figure 1: Conceptual block diagram of the integrated co-simulation framework and WCET estimation components.
COMSOL Multiphysics is a simulation platform enabling detailed modeling of physical phenomena, while CODIS+ provides discrete-event simulation, integrating Simulink, SystemC, and FPGA hardware emulation. The proposed framework specifically refers to the integration of these two tools, incorporating the CNN-based noise reduction model and WCET profiling module developed within CODIS+, making it readily applicable to other biosensor models and simulations. CODIS+ integrates framework that combines two simulators (Simulink and SystemC) and one hardware emulator (FPGA DE2-115) to ensure accurate modeling and simulation. Within this environment, Simulink handles high-level system modeling and signal processing, SystemC manages event-driven simulation and hardware-aware execution profiling, and the FPGA DE2-115 emulator provides a hardware-in-the-loop verification platform for performance evaluation (Ayed, Bouchhima & Abid, 2018). The integration of these tools enables a synchronized multi-domain simulation that closely approximates real-world biosensor behavior.
The conceptual diagram illustrates the proposed co-simulation framework, which integrates physics-based biosensor modeling with advanced signal processing and real-time execution time estimation. The COMSOL Multiphysics component generates precise physics-based simulation data, capturing essential biosensor characteristics such as impedance, voltage, current, and analyte concentration. These data are initially managed by the CODIS+ Buffer, a synchronization layer that coordinates seamless data exchange and timing synchronization across different processing stages.
The signal data are then processed through a two-stage pipeline within the CODIS+ environment:
CODIS+ Simulink handles the initial signal amplification and preliminary noise filtering, recording initial processing times (T1).
CODIS+ SystemC subsequently performs advanced signal refinement through a CNN-based noise reduction algorithm, while also managing decision-making processes and logging advanced processing times (T2).
Recorded execution times (T1, T2) are transmitted to the WCET Estimation Module, where the worst-case execution time (WCET) is computed, validated, and optimized for real-time feasibility. Finally, the System Output provides the processed biosensor signals, along with critical validation metrics including signal-to-noise ratio (SNR), accuracy, computational stability, and real-time feasibility.
This high-level representation underscores the modularity, synchronization, and computational efficiency inherent in the proposed framework, establishing a clear conceptual understanding.
The biosensor’s electrical behavior—including impedance, voltage, and current outputs—is modeled using a high-fidelity electrochemical simulation previously developed and validated by the authors (Hadded, Ayed & Alshaya, 2025). This model serves as the primary source of sensor data for the co-simulation framework and reflects realistic sensor behavior under various biochemical conditions.
Specifically, the COMSOL Multiphysics model captures the dynamic response of the sensor to antigen-antibody interactions at the sensing surface. These interactions are simulated through time-dependent boundary conditions that modulate the surface charge density and potential across the biosensor’s interface. The model accounts for: (1) Dielectric and conductive properties of the biosensor’s multilayer structure, (2) Diffusion and migration of charged biomolecules in the sensing medium, and (3) Surface binding kinetics represented using a Langmuir isotherm model.
The simulation generates output signals such as: frequency-dependent impedance spectra, Transient voltage and current profiles, and Sensitivity to varying analyte concentrations (ranging from femtomolar to micromolar levels).
The biosensor’s physical layout, including electrode geometry, insulator thickness, and channel dimensions, was constructed based on nanostructured silicon designs presented in Hadded, Ayed & Alshaya (2024, 2025). A structured mesh was applied using COMSOL’s physics-controlled meshing strategy, with local refinements near the electrode interface to improve accuracy in electric field and current density calculations.
A comprehensive description of the geometry configuration, material parameters, simulation domains, and boundary conditions can be found in Hadded, Ayed & Alshaya (2024, 2025). The same validated model is used in this study to ensure compatibility between the physical layer and the digital signal processing components.
This COMSOL simulation feeds directly into the co-simulation buffer layer, providing time-resolved biosensor outputs that are subsequently processed using the CODIS+ framework.
Figure 2 presents the detailed workflow illustrated by the subsequent sequence diagram (Fig. 2).
Figure 2: Simplified sequence diagram of the co-simulation workflow.
To ensure real-time feasibility, a WCET Estimation Module is embedded within the framework. This module computes the worst-case execution time by logging execution latencies associated with: (1) Signal processing (T1) in Simulink, (2) CNN-based noise filtering and control execution (T2) in SystemC.
T1 represents the actual computational time required for filtering and amplification operations, rather than the simulated time in Simulink. Since Simulink operates with continuous-time solvers, the simulation time does not directly reflect the actual execution time. To obtain T1, the following methodology is applied:
Profiling Signal Processing Execution in a Targeted Computational Environment:
The filtering and amplification algorithms are exported as standalone C/C++ implementations using Simulink Coder.
These implementations have to be executed on the actual processing hardware (e.g., CPU, FPGA, or DSP). A high-resolution timestamping function is used to measure the actual execution duration.
Time Measurement of Processing Operations:
The execution time of each signal processing step is measured by Eq. (1):
(1) where and represent the actual execution time of filtering and amplification operations for each signal sample i and N is the total number of processed samples.
Extracting the Maximum Observed Execution Time:
The maximum measured execution time over multiple trials is considered the worst-case execution time for T1. This ensures that latency spikes due to memory access, cache misses, or CPU scheduling are accounted for.
T2 represents the processing time of Level 2 noise reduction (CNN filtering) and event-driven control logic execution in SystemC.
The CNN-based signal denoising model implemented in SystemC was originally introduced and validated in our previous work (Hadded, Ayed & Alshaya, 2025). It consists of the following layers, as indicated in Table 2:
| Layer | Type | Filter size | Activation | Output shape |
|---|---|---|---|---|
| 1 | Conv1D | 5 | ReLU | 64 |
| 2 | MaxPooling1D | 2 | — | 32 |
| 3 | Conv1D | 3 | ReLU | 32 |
| 4 | GlobalAvgPooling1D | — | — | 1 |
The network was trained using synthetic biosensor data generated from varying SNR conditions (10–40 dB), using Adam optimizer (learning rate = 0.001) for 50 epochs. The model was then converted to SystemC and emulated on the DE2-115 FPGA using the CODIS+ profiling infrastructure. Execution latencies of each layer were recorded, and resource usage was monitored to assess real-time feasibility.
The following steps are taken to compute T2:
Profiling CNN-Based Noise Reduction Execution:
The 1D CNN model is implemented in SystemC and executed under different processing conditions.
The execution time of each convolutional layer, ReLU activation, and pooling operation are measured using Eq. (2):
(2) where , , and are the measured execution times of convolution, activation, and pooling layers, respectively, and L is the number of CNN layers.
Measuring control logic execution time
The threshold detection and system response decision-making times are computed by Eq. (3):
(3) where is the time required to evaluate a signal condition, and is the time to execute a control decision.
Extracting the maximum execution time
The maximum observed execution time over multiple simulation runs determines the worst-case execution time for T2.
Total Execution Time for T2:
The total execution time for noise reduction and control logic execution is indicated by Eq. (4):
(4)
To estimate the overall execution time, the worst-case execution time (WCET) is computed based on T1 and T2.
The worst-case execution time is computed as:
(5)
The Safety Margin accounts for unpredictable execution delays due to hardware resource contention, cache misses, and dynamic scheduling variations (Wilhelm et al., 2008). The safety margin is then computed using Eq. (6):
(6) where is the worst-case execution time, are execution times measured at different stages of processing, and represents the safety margin, accounting for variability in execution latency due to hardware limitations, memory access stalls, and scheduling overhead.
It is important to note that , as applied in this work, does not capture hardware-related delays such as memory contention or peripheral I/O latency. Thus, the WCET values presented are optimistic estimates valid under simulation constraints. While these estimates do not account for real-world hardware latencies, the computed WCET values serve as relative indicators of task timing behavior. This relative estimation is particularly useful for early-stage design, as it provides consistent comparative insight into schedulability and processor load, even in the absence of hardware-specific measurements.
The execution time is measured over multiple independent runs using a high-resolution profiling tool (CPU cycle counters). Then, the maximum observed execution time is taken as WCET, ensuring the biosensor system meets real-time processing constraints.
By measuring T1 and T2 using profiling tools and computing WCET based on actual execution time, the proposed framework ensures that biosensor systems operate within real-time constraints. The simulation-based execution time assessment provides an early-stage validation of timing feasibility, enabling optimized biosensing performance.
This study implements an approach presented by Bouchhima, Gerin & Pétrot (2009) based on SystemC execution time profiling, communication, and synchronization approaches.
The integration of COMSOL with CODIS+ environment requires efficient data exchange between different components to accurately model the biosensor’s physical behavior, signal processing, and execution time estimation. Within this framework, COMSOL Multiphysics simulates the biosensor’s electrical and biochemical interactions, generating time-dependent sensor response data. This data is transmitted to the CODIS+ buffer layer, which intermediates the signal processing pipeline. The exchanged data includes biosensor physics outputs such as impedance variations, voltage, and current measurements, as well as time-series data representing sensor responses under different biochemical conditions, ensuring temporally accurate signal input.
The processed signals from Simulink are transferred to SystemC, where execution profiling and decision-making take place. The exchanged data consists of filtered and amplified sensor signals that undergo preprocessing, such as noise reduction and baseline correction, alongside execution time logs (T1, T2), capturing computational latency at various stages for worst-case execution time (WCET) estimation. Once refined, the signal is analyzed by the decision module, which identifies relevant biosensing events. This stage processes CNN-based noise-filtered signals while applying event-driven threshold detection algorithms, ensuring the presence of a target analyte is accurately determined.
For real-time feasibility assessment, CODIS+ transmits execution time data to the WCET profiler, where logged execution times (T1, T2) are analyzed to estimate the worst-case execution time ( ). This estimation is performed by identifying the maximum observed execution latency and incorporating a safety margin to account for computational variability. The structured exchange of sensor data, execution profiling logs, and decision outputs ensures that physical simulations, digital signal processing, and execution time evaluation remain synchronized, enabling an accurate and computationally efficient biosensor modeling framework.
Synchronization between COMSOL, and CODIS+ is governed by a time-stepped execution model, ensuring that processing delays remain within real-time constraints. This synchronization approach ensures efficient data exchange and computational efficiency while maintaining accurate biosensor response modeling.
The integration follows a fixed step synchronization approach, where COMSOL and Simulink exchange sensor data at predefined time intervals (Δt), ensuring that sensor output updates are aligned with processing cycles. This structured timing mechanism prevents data inconsistencies and ensures that the simulated biosensor response is accurately processed at each step of the pipeline.
In parallel, event-driven execution is applied within SystemC, where computational tasks are only triggered upon the arrival of new sensor data. Unlike conventional fixed-time execution models, this approach eliminates unnecessary processing, optimizing resource utilization while preserving the accuracy of event-driven signal processing.
To maintain real-time feasibility, execution constraints are evaluated using a WCET-based validation approach. At each synchronization step, the recorded execution time logs (T1, T2) are compared against predefined real-time constraints. If the estimated worst-case execution time ( ) exceeds the permissible delay threshold, an adaptive optimization strategy can be applied to adjust computational scheduling or reallocate processing resources. This approach ensures that the biosensor system remains operational within real-time execution limits while maintaining computational predictability.
By integrating fixed-time updates, event-driven execution, and WCET-based constraint validation, the proposed co-simulation framework effectively balances computational efficiency and accuracy, making it well-suited for real-time biosensing applications.
Results
The proposed co-simulation framework integrates CODIS+ and COMSOL to model and validate the performance of a biosensor system described in Hadded, Ayed & Alshaya (2025). The implementation follows a hierarchical approach, as illustrated in Fig. 3, ensuring a comprehensive representation of the biosensor’s physical behavior, electrical response, and signal processing mechanisms.
Figure 3: Co-simulation workflow implementation for biosensor signal processing and WCET evaluation.
The biosensor system is modeled using COMSOL Multiphysics to simulate the interaction between biomolecules and the sensing surface, providing a comprehensive representation of the sensor’s physical and electrical behavior. The simulation process encompasses three primary components: electrode-solution interface modeling, equivalent circuit representation, and current response computation.
The electrode-solution interface is designed to reflect real-world biosensing conditions. The system consists of a source electrode, drain electrode, and a functionalized sensing electrode, where biomolecular interactions take place. The binding events of target molecules induce impedance changes, which are subsequently converted into electrical signals.
To accurately represent the electrical characteristics of the biosensor, an equivalent circuit model is constructed. This model incorporates parasitic capacitance (Cp), resistance (Rp), and solution resistance (Rs) to simulate the impact of real-world environmental variations on sensor behavior. These parameters contribute to the dynamic response of the system, ensuring that the simulated signals align with those observed in practical biosensing applications.
The final stage involves current response computation, where the biosensor’s output signal, Is, is derived as a function of biomolecular binding events. This relationship establishes a direct correlation between the electrical response and the target analyte concentration, enabling accurate detection and quantification. The integration of these modeling components within the COMSOL Multiphysics framework ensures a robust simulation environment for biosensor performance evaluation and optimization.
To ensure real-time biosensor signal processing within the CODIS+ framework, electrical signals undergo a multi-stage processing pipeline, beginning with amplification and noise reduction before classification. The signal is initially processed through a cascaded MOSFET amplifier network, where raw sensor data is filtered and amplified to enhance the signal-to-noise ratio (SNR). Further refinement is achieved through Level 2 noise reduction, where a 1D Convolutional Neural Network (CNN) implemented in SystemC is applied to suppress residual noise and improve signal clarity. Once the signal is optimally processed, it is analyzed within CODIS+, where event-driven detection and classification algorithms determine the presence of a target analyte.
To evaluate the computational performance of the co-simulation framework, the execution time of each processing stage is measured using hardware-accelerated profiling tools, ensuring real-time feasibility. The framework operates under a synchronized execution model, where physical biosensor simulations in COMSOL generate real-time sensor response data, which is subsequently transferred to CODIS+ for real-time processing. Within CODIS+, hardware-aware digital signal processing techniques are executed on an FPGA-accelerated platform, leveraging CNN-based filtering and event classification algorithms to optimize performance. The final stage involves decision output generation, where the processed signal undergoes timing validation by comparing execution metrics against empirical benchmarks. This synchronized approach ensures highly efficient biosensor data processing, allowing for real-time decision-making and seamless integration into practical biosensing applications.
In this study, no experimental data is available; therefore, a High-Fidelity (HF) COMSOL model is used as the reference to evaluate the accuracy of the co-simulation framework. This approach ensures that the simulated results are compared against a well-established numerical solution, providing a reliable benchmark for performance validation.
To validate the performance of the co-simulation framework, multiple key metrics are evaluated.
The Root Mean Square Error (RMSE) as a statistical metric is used to measure the difference between simulated values and HF values, see Eq. (7).
(7) where is the real measured response, and is the co-simulated output.
As shown in Table 3, the raw sensor output exhibits the highest RMSE value of 7.8, indicating a significant presence of noise that distorts the signal. When a preamplifier is applied, the RMSE is reduced to 6.2, demonstrating a moderate improvement in signal quality. Further refinement using a low-pass filter results in an RMSE of 5.4, which suggests effective attenuation of high-frequency noise but limited suppression of complex noise components.
| Methods | RMSE (Mean ± SD) |
|---|---|
| Raw sensor output | 7.8 ± 0.3 |
| Preamplifier noise reduction | 6.2 ± 0.2 |
| Low-pass filter | 5.4 ± 0.2 |
| Moving average | 4.9 ± 0.1 |
| CNN-based noise reduction | 3.2 ± 0.1 |
| Proposed co-simulation (COMSOL+ CODIS+) | 2.1 ± 0.05 |
The application of a moving average filter improves the RMSE to 4.9, providing better noise smoothing. However, this approach may introduce lag and reduce signal sharpness, limiting its effectiveness in dynamic biosensing applications. The use of a CNN-based noise reduction method significantly enhances performance, lowering the RMSE to 3.2. This reduction highlights the capability of deep learning-based techniques to effectively differentiate between noise and meaningful signal components.
While these results are promising, they are based on a single biosensor architecture and controlled simulation parameters. In practice, biosensor performance may vary due to differences in sensor materials, surface chemistry, or environmental conditions such as temperature and humidity. To assess the generalizability of the co-simulation framework, future work will explore multiple biosensor designs with varying geometries and material properties, as well as incorporate simulated environmental noise. Such variability testing is essential to evaluate the robustness and adaptability of the proposed signal processing and WCET estimation approach under realistic deployment scenarios.
Discussion
The proposed Co-Simulation framework (COMSOL and CODIS+) achieves the lowest RMSE value of 2.1, demonstrating superior noise suppression compared to all other methods. This result confirms that integrating COMSOL Multiphysics-based modeling with CODIS+ signal processing enhances the accuracy of biosensor readings by leveraging both physics-based noise modeling and AI-driven noise filtering. The significantly lower RMSE indicates that this approach preserves the true characteristics of the biosensor signal while effectively reducing unwanted noise artifacts.
This design decision in the proposed co-simulation framework—specifically, the omission of feedback to COMSOL was based on the assumption that control actions (e.g., minor voltage adjustments) do not significantly alter the short-term electrochemical dynamics for the type of biosensor under study. This assumption is supported by prior literature (Elakkya & Swaminathan, 2025) that demonstrated negligible changes in transient response within short control cycles. Nevertheless, including such feedback would enhance the realism of long-term modeling and is considered for future extension.
Figure 4 presents a comparative analysis of Signal-to-Noise Ratio (SNR) improvements across various noise reduction techniques, including traditional filtering methods, CNN-based processing, and the proposed co-simulation framework integrating CNN with COMSOL Multiphysics.
Figure 4: SNR improvement using the proposed co-simulation framework: comparison with traditional noise reduction techniques.
The results demonstrate that the proposed co-simulation framework achieves the highest SNR across all frequency ranges, outperforming traditional low-pass and moving average filters as well as standalone CNN-based noise reduction. The integration of COMSOL Multiphysics with CNN enhances signal quality by combining data-driven noise suppression with accurate physics-based modeling of biosensor behavior. Unlike conventional filtering methods, which exhibit limited improvement at higher frequencies, the proposed approach maintains consistent performance across the spectrum.
This co-simulation approach preserves biosensor signal fidelity more effectively than conventional filtering methods, as confirmed by the reduced RMSE and enhanced SNR. The inclusion of physics-based refinement through COMSOL Multiphysics allows for more realistic modeling of biosensor responses, surpassing the capabilities of standalone CNN-based filtering. The findings validate the proposed approach as a robust and reliable method for improving biosensor signal processing, offering a well-balanced combination of computational efficiency and real-world accuracy.
Execution time was assessed using simulation-based profiling, with WCET estimates showing only 4% deviation, indicating strong timing predictability. The estimated WCET values incorporate a safety margin derived from simulated execution latency variations but do not account for real-world hardware constraints such as memory contention, scheduling overhead, and I/O delays. The measured execution time represents the direct execution duration of the biosensor signal processing pipeline, obtained through high-fidelity simulation models that closely approximate real-world conditions. The estimated worst-case execution time is computed using profiling tools in SystemC and CODIS+, ensuring that timing constraints are met under the most demanding computational scenarios.
To quantify the accuracy of execution time estimation, the Execution Time Error (ETE) is defined by Eq. (8) as:
(8) where is the high-fidelity simulated execution time, and is the estimated worst-case execution time. This approach is considered as an effective methodology for estimating real-time performance in embedded and hardware-accelerated systems, The ETE percentage achieved is about 4% which validates the precision of the execution time estimation model, ensuring that the system meets computational predictability requirements.
Furthermore, while hardware-level latencies such as memory contention and I/O delays are not explicitly modeled, the WCET estimations serve as relative indicators of timing behavior that remain valuable for system schedulability analysis. These estimates help identify timing bottlenecks and assess real-time feasibility under worst-case software execution paths. This approach is commonly used in model-based embedded system design, where relative WCET values provide meaningful insights even before hardware is finalized. Therefore, the current results offer reliable guidance for real-time deployment planning despite the absence of physical hardware delays.
While the software-based co-simulation framework ensures high accuracy and efficient execution time estimation, real-time biosensor applications demand lower-latency processing. FPGA acceleration enables real-time parallel computation, reducing processing time compared to sequential CPU execution. Additionally, FPGA architecture consumes less power than CPUs and GPUs, making them ideal for energy-efficient, embedded biosensing systems. By implementing CNN-based noise reduction and execution time profiling on FPGA hardware, the framework can achieve faster signal processing, reduced latency, and improved real-time feasibility. This enhancement ensures that the co-simulation model meets the stringent performance requirements necessary for practical biosensor deployment in biomedical and environmental monitoring applications.
While the simulation-based evaluation demonstrates strong potential, it is acknowledged that real-world biosensor deployments may introduce variability not captured in the current model such as thermal drift, parasitic noise, and hardware-related delays. Nevertheless, the framework’s predictive estimates (WCET and signal quality) are intended as relative, bounded metrics for early-stage scheduling and design optimization.
Conclusions
This article presented a co-simulation framework integrating COMSOL Multiphysics and CODIS+ to enhance the accuracy and computational efficiency of biosensor system simulations. The framework combines high-fidelity multiphysics modeling with AI-driven noise reduction and execution time estimation to improve signal processing reliability. By leveraging SystemC profiling tools for WCET estimation, the proposed approach ensures both high detection accuracy and real-time feasibility. The validation results show a significant reduction in RMSE (from 7.8 to 2.1) and improved SNR compared to conventional filtering techniques. Additionally, the low ETE of approximately 4% demonstrates the precision of the execution time estimation model. A key limitation of this study is its reliance on simulation data. Experimental validation is necessary to fully verify the framework’s performance in real-world conditions.
Despite these promising results, several aspects warrant further investigation. Future work will focus on hardware acceleration techniques, such as FPGA-based implementations, optimizing computational efficiency and reduce processing latency. Additionally, expanding the framework to support real-time embedded processing will enhance its applicability in practical biosensing environments. The integration of adaptive learning models could further improve noise filtering capabilities by dynamically adjusting to varying biosensor conditions. Finally, experimental validation using physical biosensor prototypes will be pursued to confirm the simulation results in real-world conditions.
In summary, this study introduces a novel co-simulation framework that combines COMSOL-based physical modeling with AI-enhanced signal processing (CODIS+) and SystemC-based WCET estimation, achieving both signal accuracy and timing predictability. The proposed system demonstrated significant improvements in RMSE and SNR, along with an ETE of approximately 4%.
Future work will involve experimental validation using actual biosensor hardware, exploring generalization across diverse biosensor architectures and environments, and developing real-time embedded implementations. To strengthen the reliability of simulation-derived findings, future work will also focus on hardware-in-the-loop validation using real biosensor circuits and embedded platforms, thereby aligning simulation accuracy with empirical measurements under practical deployment conditions. Further enhancements may include FPGA-based acceleration and adaptive learning models to dynamically respond to biosensor variability. These directions will contribute to the development of scalable, accurate biosensor systems for biomedical diagnostics, environmental monitoring, and lab-on-chip technologies.
Supplemental Information
Simulated biosensor system data.
A simulated biosensor system where impedance measurements, signal processing, and execution time profiling have been systematically recorded across a range of frequencies. The data is generated using COMSOL for biosensor modeling and a co-simulation framework CODIS+ for signal processing and real-time performance evaluation.



