1. Introduction
Recent research indicates that gastroesophageal cancer is the fourth most common gastrointestinal cancer after colorectal, pancreatic, and hepatobiliary cancer and has the third highest mortality rate [
1]. At the same time, technological advances [
2] have brought numerous results in increasing the chances of survival of patients with various diseases, making people aware of the diagnosis with positivity, and being more focused on treatment.
The storage of patient data and their monitoring both in real time and as a medical history, have enabled more complex analysis that helps the doctor to predict early a possible relapse. This fact has increased the need to develop data collection and acquisition systems, either in a centralized or decentralized way, depending on their architecture and the way they manage the data.
This article addresses the challenge of integrating a real-time, versatile Cyber-Physical System Interface (CPSI) for in vivo monitoring of implantable medical devices. Current systems often lack modularity, adaptability to various sensor types, or the ability to visualize and analyze data in real time in a simulation environment. Our proposed framework combines a widely available controller (Arduino) with MATLAB-based visualization, creating a modular system that can be adapted to different application domains, such as medicine, energy, or pharmaceuticals.
For instance, in energy monitoring, the same system architecture (based on sensors and CPSI) could be adapted to track environmental conditions around energy infrastructure (e.g., vibration sensors for pipeline monitoring, temperature sensors for overheating detection, or tilt sensors for stability control of solar panels).
In the pharmaceutical field, the CPSI can be used to monitor environmental variables (temperature, humidity, and vibration) during storage or transport of sensitive materials, ensuring compliance with quality standards.
This cross-domain applicability stems from the generic design of the system, which supports plug-and-play sensor integration, real-time communication with external analysis platforms (such as MATLAB), and flexible data processing pipelines—all essential features of a modern cyber-physical system.
The main contributions of this paper are as follows:
The development of modular CPSI architecture for real-time data acquisition and analysis, suitable for in vivo applications.
A practical implementation using a simulation environment (MATLAB) and an Arduino-based sensor system.
A dual case study demonstrating the system’s utility: (i) analyzing the influence of prosthesis geometry variations and (ii) evaluating tissue response to an implant.
Compared to the usual approaches, which typically focus either on the hardware or software components in isolation, our approach demonstrates salability and adaptability of the system in a medical use case, with potential for cross-domain application.
Despite significant technological and medical advances in the field of esophageal cancer, current research remains heavily focused on areas such as imaging, diagnosis, and surgical intervention. These domains benefit from mature methodologies and are supported by well-established clinical protocols and regulatory frameworks. In contrast, real-time, personalized monitoring using portable or implantable devices integrated into esophageal prostheses is still an underdeveloped segment. This is due to anatomical challenges (e.g., the deep and variable positioning of the esophagus), inter-patient variability, and the absence of standardized safety regulations for such embedded systems. Consequently, CPSI, which offers a promising bridge between sensor networks and remote clinical platforms, has not yet been sufficiently investigated in this context. This work aims to highlight this gap and propose a versatile CPSI-based architecture capable of supporting future development of personalized, real-time monitoring tools for esophageal cancer management.
3. Use Case
The project team started from a prosthesis that is currently both patented and used in esophageal implants for cancer patients by the medical team. In the 2021–2022 academic year, the laboratory received a prototype of an esophageal prosthesis, which was the subject of a patent developed by a team of doctors from Colțea Hospital, registered in the Official Bulletin of Industrial Property OSIM of Romania under no. 130466/30.01.2017. At the same time, another result of the project team is represented by [
15], which is a monitoring and control system with a data collection and statistics interface. Through the SIMBIO project [
16], the project team brings closer innovative solutions for adaptive or stimulus-responsive functional elements, embeddable into hierarchical structures, which allow for beneficial structural modifications for design through silico techniques, which can be supported by artificial intelligence-assisted approaches.
As part of the project [
16], algorithms were developed to analyze the influence of variations in prosthesis geometry and evaluate tissue response to the implant. Several relevant indicators were studied to understand the interaction between the prosthesis and the surrounding biological tissue. A predictive algorithm was also developed to detect anomalies in medical data sets, which allows for the automatic identification of deviations in the health status of patients, providing the possibility of early diagnosis and improving patient care. At the same time, strategies for multimodal treatment of esophageal cancer were explored, with the aim of optimizing therapeutic combinations and improving clinical outcomes. These strategies help the authors discover the integration of different treatment methods, such as surgery, chemotherapy, and radiotherapy, to increase their efficiency. The ultimate goal of the project [
16] is to improve clinical outcomes by personalizing treatment according to the needs of each patient, based on information obtained from the developed algorithms and medical data analysis.
To continue the research, the authors proposed below two approaches through which controllers and data transmission can be used to be subsequently stored in databases and processed in statistical form.
The first is a configuration of hardware components composed of controllers and sensors, which can provide accuracy and precision in the esophageal prosthesis implant through data collection.
The second configuration of software and physical components composed of controllers and sensors is intended to collect data and indicate the level of inflammation and tolerance of the implant, which may reveal a possible relapse, which sends data to a CPSI.
The board used in the case study on both situations described is the Arduino Uno R3 ATMega328P-AU CH340G (Bitmi, Bucharest, Romania)—a versatile experimental platform widely used in scientific and technical research due to the integration of multiple inertial and environmental sensors. This board is, thus, a fundamental element in research and applied engineering projects, offering an optimal balance between performance, cost, and versatility.
3.1. Analysis of the Influence of Variations in Prosthesis Geometry
The analysis of the implant geometry may require the use of sensors capable of measuring dimensions, shapes, positions, and distances. Depending on the characteristics of the prosthesis, the following sensors are the most suitable:
Ultrasonic sensor HC-SR04—The operating principle is based on ultrasonic waves to determine the distance to the skin (or, as the case may be, to another body/object). This sensor can be used to evaluate the dimensions and general shape of a body by successive measurements from different angles.
GY-87 10DOF sensor (MPU6050, HMC5883L, BMP180)—It integrates an accelerometer, a gyroscope, a magnetometer, and a barometer, making it ideal for determining the kinetic and positional parameters of the prosthesis. Due to this, in the current application, it is proposed to be used for measuring tilt, orientation, and movement.
Rotary encoder module KY-400—This sensor is intended for measuring rotation angles and rotational movements of the prosthesis. Due to its advantages, is useful in the analysis of moving bodies or in the study of rotation mechanisms.
TCRT5000 IR Sensor Module—It uses the reflection of infrared light as its operating principle to detect the contours of an object placed on a flat surface. The sensor is used to identify and analyze shapes through the contrast between reflective and absorbent surfaces.
KY-010 Light Interruption Sensor Module—Due to its physical properties, it can detect changes in light caused by the presence or absence of an object at a certain point. Strategically placed, this sensor is useful for identifying edges and delimiting the contours of the prosthesis.
The
Figure 1 shows the prototype for analyzing the influence of variations in the geometry of the esophageal prosthesis, composed of the HC-SR04 ultrasonic sensor, KY-020 angle sensor, and TCRT5000 IR sensor.
The software code implemented for the three sensors on the work plate was designed to monitor and adjust the position of an intelligent esophageal prosthesis. The purpose of this prototype and its software implementation is to collect data on the positioning and stability of the implant in relation to the adjacent anatomical structures of the prosthesis and the patient. Below are presented the results of the software developed on the impact of each sensor on the geometry and functionality of the prosthesis.
The HC-SR04 sensor is used to measure the distance between the prosthesis and the walls of the esophagus. The data extracted in real time is processed, and it can be detected whether the prosthesis is in a stable position or if it has moved from the reference. By a sudden change in the distance, the software can indicate a migration of the prosthesis, which would require detailed medical intervention.
By using the KY-020 sensor, which detects changes in inclination, the alignment of the prosthesis can be assessed. This creates several cases that can be analyzed by either the software or the surgeon: if the prosthesis tilts excessively in one direction, this may indicate uneven pressure on the esophageal mucosa, which could lead to injury or discomfort for the patient. The software can send alerts if the position of the prosthesis deviates from the standard reference values, indicating the need for correction through an automatic adjustment mechanism or through a medical procedure.
In the prototype, the IR sensor (TCRT5000) is used to detect the presence of bodies that may interfere with the functionality of the prosthesis. By analyzing the data collected during the implant, an adjustment of the prosthesis position can be interpreted in such a way as to facilitate the passage of food and, thus, optimize the swallowing process.
3.2. Tolerance Feedback Prototype
Integrating sensors into such medical devices can significantly improve their monitoring and adaptability, allowing early detection of complications, optimization of positioning, and adjustment of parameters in real time. The most common sensors can be the following:
Sensors for detecting inflammation;
DS18B20—Accurate digital temperature sensor;
KY-013—Temperature sensor with NTC thermistor;
KY-028 (LM393)—Digital temperature sensor with comparator.
Sensors for analyzing body reactions (inflammation, stress, and sweating);
Sensors for biomechanical analysis (inflammation, muscle stiffness, and tremor):
SW-18015P—Vibration sensor;
KY-031—Vibration sensor module;
GY-87 (MPU6050)—Accelerometer and gyroscope (detects movements and joint stiffness).
Figure 2 shows the prototype for the tolerance analysis application and early detection of complications. In the developed code, the additional library required for the operation of the sensors is DHT.h. This is used and introduced for communication with the DHT11 temperature and humidity sensor; being indispensable for compiling the code, it provides functions for reading temperature and humidity in a simplified way. The library can be installed from the Arduino Library Manager or downloaded from official sources, such as GitHub (
https://docs.arduino.cc/libraries/dht-sensor-library/ (accessed on date 15 Jule 2025)). This research uses the DHT11 library downloaded from the Arduino Library Manager.
The use of the DHT11 sensor allows the recording of temperature and humidity in real time. These measurements are relevant for the detection of local inflammation, which may indicate an adverse reaction of the tissues to the implant. The increase in temperature around the prosthesis may be a sign of an inflammatory process, and changes in esophageal humidity may influence the adhesion of the prosthesis and the formation of pathological secretions, such as excessive mucus. These data are essential for the early diagnosis of infections or the adaptation of post-implantation treatment.
By integrating the KY-031 vibration sensors, the movement of the prosthesis and its interaction with the esophagus can be monitored. These sensors can detect abnormal oscillations of the implant caused by esophageal peristalsis or involuntary contractions. In the case of a positioned or unstable prosthesis, vibrations may indicate irritation of the esophageal mucosa, which could lead to tissue erosions or discomfort for the patient. Thus, by analyzing vibrations, the positioning and stability of the prosthesis can be improved, reducing the risk of subsequent complications.
The integration of DUFAFF_MIC_SOUND, a sound sensor (which sends data both digitally and analogically), allows the recording of the sound level generated by the internal movements of the esophagus. The main function that this sensor performs in the application proposed by the authors is to send data about the behavior of the prosthesis during the swallowing process. These measurements can provide information about the efficiency of swallowing, thus, detecting obstructions or gastroesophageal reflux.
By analyzing the data distribution graph, an abnormal sound level, or sudden fluctuations can be identified that could signal esophageal dysfunction or incomplete adaptation of the prosthesis to the patient’s anatomy.
3.3. Interface in Cyber-Physical System Implementation
A typical CPSI could integrate sensors to measure temperature, humidity, vibration, movement, and other physiological signals within the esophageal prosthesis. This would allow for constant monitoring of the patient’s condition and the interaction of the prosthesis with the esophageal environment, identifying potential complications or problems (inflammation, adverse reactions, prosthesis instability).
CPSI in the field of medicine, and especially in esophageal cancer is a concept quite far from current studies. Few works address the field of CPSI due to several medical factors such as difficult-to-access anatomy (deep location of the organ), high variability between patients, and the need for precise imaging diagnosis combined with biopsies. But in addition to these factors, it can be mentioned that at the current level a standard for safety and extremely strict regulations are not indicated. As small steps in this direction, the authors of the work [
17] designed a photoelectrochemical biosensor (PEC), without supply voltage, based on the Cu
2O/PEDOT:PSS/ZnO nanocomposite. The goal was to detect esophageal cancer cells and classify them based on the level of aggressiveness.
With this discovery, we can adapt the idea of CPSI from this article with future advances in biosensors that can be implanted in the esophageal area.
A group of researchers analyzed the current role of artificial intelligence in the management of esophageal cancer [
18] and focused on one of the future perspectives of obtaining wearable devices, simultaneously measuring self-reported adverse events, emergency department visits, and chemotherapy completion rates through an application to ultimately develop an artificial intelligence-based complication prediction algorithm based exclusively on biomarkers (NCT05937477).
Thus, in this sense, an interface that can be used by both the patient (local) and the physician (remote) is proposed below.
Figure 3 represents a functional block diagram of the Cyber-Physical System Interface (CPSI) used for sensor integration and data analysis and illustrates, from left to right the following:
Sensors (Input Layer): Vibration sensor, ultrasonic sensor, temperature and humidity sensor, infrared (ir) sensor, motion sensor, tilt sensor—these modules form the sensory subsystem for detecting environmental and physiological parameters relevant to prosthesis behavior and tissue response;
Signal conditioning and transmission (interface layer): breadboard and jumper wires—ensure flexible prototyping and interconnection between sensors and the controller, enabling real-time signal routing and data acquisition;
Processing unit (control layer): Arduino Uno microcontroller board—acts as the central processing unit (CPU), collecting raw sensor data and performing initial filtering, analog-to-digital conversion, and communication handling;
Communication and visualization (output layer): USB interface to laptop—facilitates serial data transmission from the Arduino to the host system. MATLAB GUI interface—used for real-time visualization, data logging, and analysis, providing a scientific environment for evaluating implant geometry, motion, and surrounding tissue response.
Within the SIMBIO project, the first version of CPSI in vivo was developed, which will have improvements after a detailed analysis together with complex teams and feedback from stakeholders. The interface at this time in the current version, at the graphics level, was created with Design App in MATLAB, version R2021b. Desing App was chosen for the graphical interface of the application due to several advantages it offers in the context of the development of an esophageal prosthesis system:
It allows the fast and efficient creation of graphical interfaces (GUI—Graphical User Interface) through a drag-and-drop approach;
It has direct interaction with data and simulation models. Within an esophageal prosthesis system, this means that data collected from sensors can be processed and visualized instantly, and users can observe the evolution of parameters, such as temperature, vibrations, or humidity, in an interactive and visual way;
Allows customization of the interface appearance, providing flexibility to meet the specific needs of a medical system;
Allows integrating advanced functionalities, such as data processing algorithms, statistical analysis, or machine learning, directly into the graphical application.
The system is organized so that each sensor is connected to the microcontroller through dedicated pins. The hardware configuration is achieved by assigning the trigPin and echoPin pins for the ultrasonic sensor, tiltPin for the KY-020 sensor, and irPin for the IR sensor. Distance measurement using the ultrasonic sensor is achieved by generating a short pulse on the sending pin (trigPin), followed by measuring the time required for the echo to return to the receiving pin (echoPin). Within the software implementation, communication between the microcontroller and an external system (PC or other monitoring device) is achieved through a UART (Universal Asynchronous Receiver-Transmitter) serial interface. To ensure efficient data transmission, the Serial.begin (9600); function initializes the baud rate to 9600 bps (bits per second), a value chosen to maintain a balance between transfer speed and communication stability. This value is compatible with most microcontrollers and avoids synchronization errors or data loss, which can occur at higher rates without appropriate hardware.
During project implementation, the microcontroller is connected to a computer via a USB serial port, which is mapped as COM5 on the host system.
Serial communication between Arduino and MATLAB is an efficient method to transfer sensor data in a format that can be analyzed and processed for optimizing the design of the esophageal prosthesis and for continuous monitoring of the patient’s condition. This approach combines hardware with software to create an intelligent and adaptable system that improves diagnostic accuracy and treatment efficiency. Some of the functions in the Arduino code were essential for transmitting data to a computer or application that processes and analyzes this information and realizes CPSI. Specifically, these functions are used to send measured data from sensors (such as temperature, vibration, or humidity) via the serial port to software on the computer (e.g., MATLAB or a custom application).
To visualize and monitor real-time sensor data, a custom graphical interface was developed using MATLAB App Designer. This tool enables the creation of interactive applications with graphical elements (widgets), including plots, buttons, and labels. The GUI (Graphical User Interface) contains a Push Button, which is associated with a callback function. When the user clicks this button, the application performs the following:
establishes a serial connection with the Arduino board via COM5;
reads sensor data in real-time from the microcontroller;
parses the serial input and extracts the individual sensor values;
stores the data in vectors dedicated to each sensor type;
dynamically updates the graph, reflecting the current sensor readings over the selected time interval.
Although the same sensors described in
Section 3.2 are used in this implementation,
Figure 4 presents them using simplified, user-friendly terminology. This choice was made intentionally, as the interface illustrated in
Figure 4 is designed for non-technical users such as medical staff or patients. The original product codes and detailed sensor specifications remain listed in
Section 3.2 to maintain technical accuracy, while the interface focuses on usability and intuitive understanding.
Figure 4 shows the data from three sensors (temperature, humidity, and swallowing sound). Also in the image is a button, which by pressing it, this button associates with a callback that triggers this complete process. By pressing the button, the MATLAB application will open the connection with Arduino, read the data from the sensors connected to the microcontroller, and continuously update the graph in the interface as new values are received. Initialization of the vectors for storing data that will store the measured data for each sensor over 10 s (time chosen for testing, but a relevant time for the application can be chosen hours/days, etc.). As time passes (in this case, for 10 s), the application reads a line of data from Arduino. The data is then processed to extract the numerical values corresponding to each sensor. After reading each set of data, the graph is updated to reflect the evolution of the sensors over time.
The MATLAB code for this application is implemented in the App Designer environment and includes the GUI design and the backend code for serial communication and data visualization.
4. Conclusions
The presented esophageal prosthesis can become an intelligent and adaptable device, capable of providing real-time feedback on the interaction with the medical environment. This approach contributes to the early diagnosis of complications, the optimization of the prosthesis positioning, and the improvement of the patient’s quality of life.
The presented interface can be easily adapted to handle more complex visualizations and advanced algorithms, such as regression analysis, machine learning models, or other data-driven techniques. Using the robust computational and graphics capabilities of MATLAB, the system can process and display complex data sets in real time, providing valuable information about the behavior and performance of external devices, such as a prosthetic implant. By integrating more sophisticated algorithms, the interface can be extended to provide predictive analytics, trend analysis, or even optimization tasks tailored to specific biomedical applications.
Currently, there are no clearly defined clinical guidelines, regulations, or certification standards for the use of wearable or implantable devices with integrated sensors in the postoperative monitoring of esophageal cancer. This lack of regulation represents a major obstacle to the scalability and transposition into clinical practice of technological solutions such as CPSI. For this reason, it is essential for such initiatives to be approached through a solid interdisciplinary collaboration, with a team formed by engineers, physicians, surgeons, biomedical device researchers, and representatives of implantable medical technology companies. Only through joint effort can safe, standardized, and effective solutions be developed to meet the complex needs of patients and therapeutic teams for esophageal diseases.
Future works will integrate an interface enabling machine learning algorithms to predict future prosthesis abnormalities or recurrence data and also analyze the feedback of sensors during interventions on the prosthesis. The use of biomedical-grade sensors will be considered, as well as the construction of artificial muscles to create a real monitoring, control, and actuation system.