Development of An Integrated Framework for Cyber-Physical System (CPS)-Enabled Rehabilitation System

A Cyber-Physical System (CPS)-enabled rehabilitation system framework for enhanced recovery rate in gait training systems is presented in this paper. Recent advancements in sensing and data analytics have paved the way for the transformation of healthcare systems from experience-based to evidence-based. To this end, this paper introduces a CPSenabled rehabilitation system that collects, processes, and models the data from patient and rehabilitative training machines. This proposed system consists of a set of sensors to collect various physiological data as well as machine parameters. The sensors and data acquisition systems are connected to an edge computing unit that handles the data preprocessing, analytics, and results visualization. Advanced machine learning algorithms are used to analyze data from physiological data, machine parameters, and patients’ metadata to quantify each patient’s recovery progress, devise personalized treatment strategies, adjust machine parameters for optimized performance, and provide feedback regarding patient’s adherence to instructions. Moreover, the accumulation of the knowledge gathered by patients with different conditions can provide a powerful tool for better understanding the human-machine interaction and its impact on patient recovery. Such system can eventually serve as a ‘Virtual Doctor’, providing accurate feedback and personalized treatment strategies for patients.


INTRODUCTION
Due to population aging and various diseases, about 15% of the global population suffers from a disability issue to some extent, of whom 2-4% experience severe disability with loss of motor functioning (WHO, 2011). For instance, stroke has been a severe global healthcare issue that causes the majority of adult disability, even in developed countries (WHO, 2003). Rehabilitation is the most common way to help people with disabilities resume normal activities in daily life. However, as stated in (Langhorne et al., 2009), most patients could survive from the first stroke, but the most significant impact on patients and their families is the long-term disability and high cost of the subsequent rehabilitation process. Thus, any techniques that can facilitate patients' rehabilitation will significantly benefit their overall well-being and reduce future medical expenses. Throughout past decades, many different rehabilitation practices have evolved. Currently, three practices prevail in the rehabilitation field: body weight supported treadmill training (BWSTT) (Mao et al., 2015), constraint-induced movement therapy (CIMT) (Taub et al., 1999), and robotic therapy (Chang & Kim, 2013). Different types of rehabilitative training machines are used in these three practices. Rehabilitative training machines are mainly designed to provide intensive repeated exercise for patients while ensuring their safety and comfortability. However, it is difficult for doctors to promptly optimize patients' training prescriptions without evidence-based feedback from the machines.
To address this issue, this paper proposes an integrated framework for an AI-enhanced rehabilitation system with CPS architecture, which can collect, process, and model the data from patients and rehabilitative training machines. After the data modeling, the system can quantify the patient's recovery progress, devise personalized treatment strategies, adjust training machine parameters and provide feedback to physicians for further rehabilitative training plan making. The contribution and novelties of this research can be summarized as follow: • 5-level CPS structure, namely the 5C architecture, is a step-by-step guide for developing and deploying the CPS system, which is widely used for various industrial applications. This research introduces the 5C architecture into the rehabilitation system, which can provide insight into a patient's recovery status.
• A comprehensive CPS-enabled rehabilitation system is proposed, including edge computing module, healthcare cloud module, user interface module. The rest of the paper organized as follows. Section 2 presents the current practice of Cyber-Physical System (CPS) in the healthcare area. Section 3 details the proposed 5C architecture of the CPS-enabled rehabilitation system. Section 4 presents the implementation of the proposed system with details. The conclusions are summarized in Section 5.

CURRENT PRACTICE IN HEALTHCARE CPS
Recently, the tremendous success of artificial intelligence in many areas confirms the potential of integrating data analytics into the training machine to solve the aforementioned issues and further take the quality of rehabilitation to the next level (Gao & Cui, 2020;Lauffenburger et al., 2020;McArthur et al., 2021). Real-time data analytics can provide a quantitative perspective regarding a patient's recovery progress for the patient, therapist, and doctor. Thus, the developed smart system, based on data analytics, can assist therapists in adjusting training regimens, which reduces the level of oversight necessitated and provides information, otherwise unobservable, about the patient's responsiveness to the therapy. Cyber-physical system (CPS) refers to the mechanism that tightly integrates the computational and physical resources using data analytical techniques (Lee et al., 2015). CPS has been drawing more and more attention from both academia and industry in recent years (Feng, 2019Lee et al., 2020). One primary benefit of adapting CPS to a healthcare application is enabling doctors and clinicians to monitor patients from anywhere at any time via information and sensing technologies (Zhang et al., 2015). CPS-enabled healthcare systems have been investigated for various applications. For daily living applications, Iso-Ketola et al. (2008) developed a wearable measurement system for patients recovering from a hip replacement operation, which is called HipGuard. The measurements from the system are helpful for patients to follow the precautions given by a surgeon. Lu and Fu (2009) proposed a location-aware activity recognition approach, which can infer a single resident's interleaved activities. Sung et al. (2005) developed a flexible wearable platform, called LiveNet, which is used for longterm ambulatory health monitoring with real-time data streaming and context classification. Wang et al. (2008) proposed a fall detecting system using an accelerometer for data collection and an algorithm to distinguish between falls and daily activities. In medical status monitoring applications, Kailanto et al. (2008) introduced an ECG measurement, analysis, and transmission system, which used a mobile phone as a base station. Konstantas and Herzog (2003) developed a generic Body Area Network (BAN) for health monitoring using 2.5/3G for mobile healthcare. Shynayder et al. (2005) developed a combined platform for medical sensor networks, providing protocols for device discovery and publish or subscribe multihop routing. In addition, a simple query interface can be used for medical monitoring. For medication intake, López-Nores et al. (2008) proposed a smart medicine manager system based on smart medicine packaging, residential networks and semantic reasoning, which can guarantee a great precision in drug monitoring. Pang et al. (2009) proposed a healthcare solution for medication noncompliance and daily monitoring.
However, most of these applications mainly focus on sensing, data management, communication, and security element of the CPS framework (Haque, Aziz, & Rahman, 2014), which are typically as auxiliary tools for well-trained doctors in most cases. The current CPS enabled health care systems has gradually achieved automation, but it is far from intelligent. Although a large amount of data with critical information have been generated and orderly stored, most doctors or physician still rely on their domain knowledge and experience to design the treatment plan, because it is difficult to directly get the useful information from the historical raw data. Especially in CPS application of rehabilitation, much less emphasis had been put on intelligent analytics. Therefore, this research focus on the how to incorporate intelligent analytics to the CPS application of rehabilitation, which can provide evidence-based feedback from the collected raw signals using data analysis techniques.
In the industrial areas, 5C architecture has been widely used for various scenarios based on big data, leading the transformation of the manufacturing industry and bringing huge benefits. The achievement of CPS and 5C architecture in industrial applications have been proved. Considering the current gaps and opportunities, we propose introducing 5C architecture into the rehabilitation system to fill up the gaps in this area. The proposed CPS-enabled rehabilitation system is an evolution of current research in this area, which can make full use of the valuable data. It tries to extract the critical information in the data to quantify the patient's recovery progress, personalized treatment strategies, adjust machine parameters for optimized performance, and provide feedback regarding the patient's adherence to instructions. Meanwhile, the proposed framework can provide a direction and guidance for the further research in CPS-enabled healthcare systems.

5C ARCHITECTURE OF REHABILITATION CPS
The proposed CPS-enabled rehabilitation system leverages the Prognostics & Health Management (PHM) technologies in the engineering field, which provides insight into machinery equipment's current performance and the estimated remaining useful life before failure based on advanced data analytics techniques (Cai et al., 2019;Feng et al., 2019;Jia et al., 2018). Similarly, in the rehabilitation field, data analytics can be used to assess patients' current recovery conditions as well as estimate the remaining rehabilitative time before full recovery.
The 5C architecture is proposed in our previous work (Lee et al., 2015) as a step-by-step guideline for implementing a CPS for manufacturing application. Due to the dissimilarities of research subjects, it's worthwhile to explore the feasibility of the 5C architecture in the rehabilitation application. As shown in Figure 1, the details of the 5C architecture for healthcare are outlined as follows.

Smart connection
The first step to develop a rehabilitation CPS is to acquire reliable data from both patient and training machine, which can be considered as the physical space. The data might be collected from various sensors on the human body, directly from the training machine, the patient's electronic health records and so forth. Efforts are needed to unify the format of different data sources to facilitate the data analysis in the next conversion level.

Data-to-information conversion
The data should be translated to readable, understandable and valuable information for the patient and the doctor. Data analytics techniques can be applied to quantitatively assess the current health condition and predict the recovery time for the patient. The Smart Cyber Box for Healthcare, which is the device to realize data analysis in the medical area, is the appropriate technology to accomplish the functionality of the conversion layer.

Cyber
At the cyber level, the information from all patients will be gathered together in an information center. Based on the information, specific analytics can be performed to extract additional information that gives better insight over the status of an individual patient among the population. These kinds of Figure 1. 5C architecture of the rehabilitation CPS analytics enable the peer-to-peer comparison, where an individual patient can be compared and rated among the population. These populations can be aggregated based on patient attributes, a set of discrete and categorical variables such as patient age, gender, height, weight, medical conditions, etc. These clustered populations are necessary for analyzing patient conditions within an appropriate peer network. Subsequently, a patient's rehabilitative progress and health status can be tracked.

Cognition
After the cyber level, a thorough knowledge of the monitored patient is generated. A proper presentation, such as a simple and easy-to-read visualization figure, is needed to demonstrate useful information to patient, doctor, and therapist respectively. Since quantitative health information is available in real-time, decisions on the patients' rehabilitation training can be made promptly. Doctors can use it as a reference to modify the training prescription and therapist can quickly determine whether to revise a patient's therapy program.

Configuration
At the configuration level, the feedback is provided from the cyberspace to the physical space. Doctors can take the quantitative information from the cognition level as a reference to modify the training prescription for the patients, and their therapists can quickly determine whether to adjust the patient's regimen during the therapy session. Meanwhile, patients might actively cooperate with the therapist when they know how well they are now, and how well they will be after a certain duration of training.

Overview of CPS-based Rehabilitation System
A comprehensive framework of the CPS-enabled rehabilitation system is described in Figure 2. The framework includes three primary modules: (1) Edge computing module, (2) Healthcare cloud module, (3) User interface module. Each module is detailed in the following subsections.

Edge Computing Module
The edge computing module is developed to monitor rehabilitation training processes, diagnose and prognosis patient health conditions. This module is implemented in a Healthcare Cyber Box (HCB). As an edge server, HCB is dedicated to collect physiological signals, perform data preprocessing, feature extraction, health diagnosis, and prognosis with the deployment of Watchdog Agent®. Watchdog Agent® is an infotronics-based toolbox for performance degradation assessment and prediction    (Djurdjanovic et al., 2003). After each rehabilitation training session, the information, such as the features extracted from raw biological signals, health assessment results, operation records, etc., will be transmitted from the local module to the healthcare cloud module.

Signal acquisition
In our current investigation on stroke rehabilitation, the sensor list and acquired physiological signals and are present in Table 1 and Figure 3. The sensor list can be enriched in later research and implementation. There are various sensors adopted to measure both the physical capabilities to provide insights into a patient's response to therapy in real-time. The signals are acquired and then stored in the local HCB. As shown in Figure 4, the edge computing module with a data acquisition system has been tested in the lab environment.

Signal processing and health modeling
Due to the variety of the acquired signals, different signal processing techniques need to be utilized. Usually the biological signals include noisy information, some filtering operations are necessary to be taken to improve the signal quality. Figure 5 gives an example of the filtered signals from our Healthcare Smart Box. Furthermore, Statistical information is extracted to extract various features: mean, standard deviation, kurtosis, peak to peak, crest factor, root mean squared (RMS), etc. Another set of features are extracted from frequency domain, such as a characteristic frequency peak or energy in a frequency band, amplitude, phase. For the time-frequency domain, statistical moments and wavelet-based features are extracted from dynamic signals such as EMG signals to capture the non-stationary characteristics of the muscle activities during training processes. All these features can help to summarize data and quantify properties of a domain given a sample observation. Also, vectorized feature matrix will significantly facilitate the application of various machine learning algorithms. Moreover, professional suggestions from therapists help to select the useful features. After feature selection, a set of compelling features would give a comprehensive description of a human's performance. In this work, once useful features are selected, they can then be combined to serve as a reflection of a subset of patient's reaction under some specified training parameter settings. Patients with different physical characteristics (such as weight, height, age, gender, and so on) and different health conditions (such as healthy individuals and the patients with a stroke of different severity such as ischemic stroke, hemorrhagic stroke, transient ischemic attack, etc.) are clustered into different group before the modeling process. The modeling methods used for health modeling in this work include: • Artificial Neural Network (ANN) is a kind of algorithms inspired by biological neural networks. ANN can recognize underlying relationships in massive data through loosely modeling based on a collection of connected units or nodes, called artificial neurons (Schmidhuber, 2015). • Principal Component Analysis (PCA) is a kind of technique for dimensionality reduction. PCA can find the principal components with the highest variance through linear projection and use them to perform a change of basis on the data (Joe Qin, 2003).
• Logistic Regression (LR) is a statistical model which uses a logistic function to model a binary dependent variable. LR models the probabilities for classification problems with two possible outcomes, which is an extension of the linear regression model for classification problems (Hosmer Jr et al., 2013). • Self-Organizing Map (SOM), which is proposed by Kohonen (Kohonen, 1990), is a type of ANNs. However, differing from other ANNs, SOM applies competitive learning as opposed to error-correction learning, and it uses a neighborhood function to preserve the topological properties of the input space. Since it is trained using unsupervised learning, it can use for dimensionality reduction and visualization. Besides, SOM also can be used for supervised learning (Hagenbuchner et al., 2001).
• Support Vector Machine (SVM) is a kind of supervised learning model, which can construct a hyperplane or set of hyperplanes for classification, regression, or other tasks. Based on the kernel method, SVM can construct hyperplanes in a high-or even infinite-dimensional space, which can adequately handle the nonlinearity in the dataset (Noble, 2006). The selection of the modeling methods depends on the application scenarios. Aside from the above modeling methods, other statistical methods, machine learning methods also can be applied for signal processing and health modeling.
To ensure the model robustness, the models should be trained and validated based on the historical patient data. There are various parameters for different modeling method to improve the model performance. In the validation stage, the best model performance should be guarantee by parameter tuning. The common parameter tuning methods include: • Grid search, is one of the common parameter tuning techniques, to find the optimum hyperparameter setting. It is an exhaustive search that is performed on the specific hyperparameter values of a model.
• Gradient-based optimization, compute the gradient with respect to hyperparameters and then optimize the hyperparameter by using gradient descent, which is most commonly used in Neural Networks.

Healthcare cloud module
The healthcare cloud module provides the services for information storage and analytics tools for patient recovery profiles, features, and health models. A patient management system is developed in the cloud server. The algorithms and well-trained models are also organized and stored in the cloud server. When a new rehabilitation training of a patient is performed, a configuration file will be generated based on the patient management system and corresponding features, models and operation records will be updated. More details about the implementation of our cloud platform and its applications can be found in (Lee et al., 2012). Asides from the functionalities of the patient management and healthcare model update, the healthcare cloud server also develops a "Virtual Doctor" system. Once the dataset on a cloud server is representative enough, the dataset can be used to establish a "Virtual Doctor" to predicts patient recovery progress and provide training suggestions for patients at different recovery stages. These stages could be customized to patient status. Take the stroke as an example, rehabilitative recovery is often set based on physical therapy ranking criteria from 0-5: where a 0 is no muscle strength, 1 is detectable muscle flicker, 2 is a detectable muscle trace, and 3-5 are varying degrees of ability to move against gravity.
The working principle of "Virtual Doctor" is shown in Figure  6. In the training stage, massive training data are extracted from historical patient recovery profiles used for model training. The deep neural network is used to establish the "Virtual Doctor" system. Once a new patient comes, the "Virtual Doctor" can quickly evaluate the patient's recovery stages and other health indexes based on the historical patient data. After the evaluation, "Virtual Doctor" can provide a comprehensive report that includes overall health assessment, recovery stages, further rehabilitation suggestions, etc. The feedback from the "Virtual Doctor" system can give physicians data-based evidence to determine treatment pathways in the future. Then, the patient can get a more precise and specific training plan for further rehabilitation from physicians.

User interface module
The user interface module is a user-friendly online graphical dashboard which is reconfigurable so that patients and doctors can retrieve different information. The user interfaces are shown in Figure 7. For patients, it provides reconfigurable virtualization tools to convey personal, customized information such as their training plan, recovery progress tracking and the corresponding suggestions from doctors or physicians. For doctors, besides the detailed patient-level information, high-level services such as patient management, rehabilitation training plan settings, feedback interactions are also available.

CASE STUDY
Electrocardiogram (ECG) is one of the acquired physiological signals in the CPS-based Rehabilitation System, which can be generated by using heart rate watch and ear pulse sensors. It can monitor the electrical activity of the heart to diagnose cardiac pathologies or evaluate other health indexes. The ECG database for this case study was extracted from the Supraventricular Arrhythmia Database (SVDB), which is available on the MIT-BIH Arrhythmia Database CD-ROM and the affiliated on-line repository physioNet.
There are 78 ECG recoding where each one was recorded from a single patient for a duration. In (Olszewski, 2001), one ECG recording was selected, and the portions of the recording which representative of normal heartbeats and heartbeats with the most prevalent abnormality are extracted.
There are 200 samples in the processed dataset used in (Olszewski, 2001), which include 133 normal samples and 67 abnormal samples. Each sample traces the electrical activity recorded during one heartbeat extracted from one complete ECG recording of a single patient. Figure 8 shows graphical representation of normal and abnormal samples by using one continuous waveform. One can see some different between normal and abnormal samples. The objective is to show the effectiveness of the edge computing module. After the signal acquisition, a classification model will be built by using signal processing and health modeling techniques. According to Section 4.2.2, common statistical features are extracted for model development, including mean, standard deviation, kurtosis, peak to peak, root mean squared (RMS). Besides, the filtered trace signals have been resampled into the signals with the same time length, which can be built as the vectorized feature matrix for the model development. Then, PCA is used for dimensionality reduction. Figure 9 shows the flow chart of this case study. Various algorithms mentioned above are used in the model training stage, including SVM, MLP, and Supervised SOM. Note that all the used algorithms belong to supervised learning, which requires label information. SOM toolbox 2.0 (Alhoniemi et al., 2003) is used for the SOM classification modeling. For the other two algorithms, the build-in toolbox in Matlab R2020b is used for the model development. To evaluate the performance of each algorithm, mean classification accuracy from 4-fold cross-validation is employed, which is widely used for the model evaluation in machine learning, as shown in Table 2. To ensure credible results, repeated three times of cross-validation. The high accuracy demonstrates that the edge computing module can effectively recognize the health status of the patient with high accuracy based on the historical data. Combining the corresponding historical treatment and training plan, the system can give physicians some suggestions for rehabilitation plans based on the classification results of the new coming patients. Table 2 Mean classification accuracy on test folds using 4 folds 3 repeats cross-validation procedure Algorithm ANN SVM SOM Accuracy 87% 86.5% 72%

CONCLUSION
This work proposes a CPS-enabled framework of rehabilitation system for improved patient recovery. The proposed CPS-based rehabilitation platform carves out the vision and practical guidelines in the healthcare area to implement CPS for better human monitoring and rehabilitation training process. The future work will include the development of prognostic technologies and improvement of cognition technologies to realize a seamless connection among rehabilitation training session, accurate health monitoring and prognosis, and optimal rehabilitation recovery decision making.