Automatic Calibration of Piezoelectric Bed-Leaving Sensor Signals Using Genetic Network Programming Algorithms

: This paper presents a ﬁlter generating method that modiﬁes sensor signals using genetic network programming (GNP) for automatic calibration to absorb individual differences. For our earlier study, we developed a prototype that incorporates bed-leaving detection sensors using piezo-electric ﬁlms and a machine-learning-based behavior recognition method using counter-propagation networks (CPNs). Our method learns topology and relations between input features and teaching signals. Nevertheless, CPNs have been insufﬁcient to address individual differences in parameters such as weight and height used for bed-learning behavior recognition. For this study, we actualize automatic calibration of sensor signals for invariance relative to these body parameters. This paper presents two experimentally obtained results from our earlier study. They were obtained using low-accuracy sensor signals. For the preliminary experiment, we optimized the original sensor signals to approximate high-accuracy ideal sensor signals using generated ﬁlters. We used ﬁtness to assess differences between the original signal patterns and ideal signal patterns. For application experiments, we used ﬁtness calculated from the recognition accuracy obtained using CPNs. The experimentally obtained results reveal that our method improved the mean accuracies for three datasets.


Introduction
The progression of longevity is forcing humanity to confront various unprecedented social problems.In hyper-aged societies, both healthy and unhealthy life expectancy lifespans are increasing year by year [1].Elderly people with longevity invariably spend longer periods of their second life outside their homes because they are living longer without severe disability [2].Hospitals and nursing-care facilities are now confronting daunting labor shortages in terms of medical doctors, nurses and caretakers.Especially during nighttime, labor shortages can lead to accidents of various types, particularly related to numerous fall and tumble risks.According to a report by Mita et al. [3], fall accidents occurred as approximately half the total number of accidents that occur among elderly people at nursing-care facilities.Most fall accidents occurred when patients left their own bed.
Providing suitable solutions with assessment primarily requires fall accident prevention.Recently, bed-leaving sensors have come to be used widely at hospitals and nursing-care facilities to prevent fall-related behaviors in advance.A method of detecting abnormal behavior patterns has been proposed for monitoring sleeping elderly people [4].One can imagine that in a psychiatric ward, however, it would be unrealistic to use a camera without some special justification.Especially for hospitals and nursing-care facilities, the use of cameras for monitoring patients is limited for reasons of privacy and morality, except for intensive care units or special wards for infectious diseases.To assess privacy considerations, a fall detection method using radio-frequency identification devices (RFIDs) has been proposed to detect changes of electrical intensity [5].Nevertheless, detection using that method is limited to a person's status after a fall.For the development of bed-leaving sensors, various factors exist for consideration in terms of system reliability, stability, durability, initial and maintenance cost, detection speed, privacy, and quality of life (QoL) for patients.
We proposed a bed-leaving sensor system [6] using piezoelectric films bound with acrylic resin boards to detect pressure.An important benefit of this approach is that it can be installed in off-the-shelf beds.Sensors installed between a bed and a cover can detect a person's behaviors.We evaluated basic sensor characteristics and the relation between accuracy and body parameters such as the weight and height of subjects [6].Moreover, we evaluated our originally developed sensor system using discontinuous datasets that comprised random behavior patterns [6].However, counter-propagation networks (CPNs) [7] used for bed-leaving behavior recognition are insufficient to incorporate individual differences in physique such as weight and height.Especially for low-weight subjects, recognition accuracies were dramatically lower.To address this difficulty, we propose a method for automatically generating a filter set for shaping sensor signals based on evolutionary learning (EL) to demonstrate automatic sensor calibration according to subjects.
The remainder of the paper is structured as follows-in Section 2, related studies of EL-based calibration methods are reviewed for improving classification and recognition accuracy.Sections 3 and 4 respectively present our proposed method and our original sensor signal datasets.Subsequently, Sections 5 and 6 present a preliminary experiment result obtained using a dataset obtained from a particular sensor, in addition to application experiment results obtained using three datasets obtained from one person for whom low initial recognition accuracy was obtained compared to those of other experiment participants.Section 7 presents our analyses of the properties of parameters and node changes for additional optimization.Finally, Section 8 concludes our presentation of the present work and highlights future work.As described herein, we use our proposed fundamental method with originally developed sensors of two types [8].To explain our present study, we have included additional details in Sections 2, 6 and 7.

Related Studies
As a framework for resolving difficulties combined with learning, inferring, and optimizing, EL-based methods are used widely in numerous applications [9].Song et al. [10] proposed a method to generate filters used for electrocardiogram signals based on a genetic algorithm (GA) [11].The limitation of GAs is that they are merely applicable to parameter optimization.Koza [12] proposed genetic programming (GP) for use as a unified method to evolve programs affected by living things.To apply program generation, learning, reasoning, and conceptual formation, GP can be extended to accommodate a structural representation of GA genotypes.Moreover, GP can express data structures and programs as trees and graphs.For an extension to graph structures, genetic network programming (GNP) was proposed for efficient searching while avoiding tree bloat.
As pioneer work, Katagiri et al. [13,14] and Hirasawa et al. [15] have proposed original frameworks of GNP that obtained intelligent behavior sequences for evolutionary robotics.Furthermore, they automatically designed complex systems based on evolutionary optimization techniques such as GA and GP.They [16] evaluated GNP using the partially observable Markov decision process (POMDP) problem developed by Goldman et al. [17].The experimentally obtained simulation results elucidated that GNP evolved more effectively than GP.Especially, premature convergence occurs only rarely in GNP compared to its more common occurrence in GP.Moreover, the fitness of GNP has been reported as higher than that of GP from the initial generation.
Mabu et al. [18] combined GNP with reinforcement learning [19] to create dynamic graph structures.They also used the POMDP problem [17] for benchmarking.The experimentally obtained results demonstrated that their method presents advantages over conventional methods based on GP and EP.Moreover, Chen et al. [20] combined GNP with Sarsa learning [21] for stock market trading to judge the timing of buying and selling.The experimentally obtained simulation results obtained using stock price datasets of 16 brands during four years clarified that the fitness and profits of their composed method were higher than the existing stock prediction methods.
Li et al. [22] combined GNP with distributed estimation algorithms to solve traffic prediction problems based on class association rule mining.They used a probabilistic model that enhanced ultimate objective evolution.The experimentally obtained simulation results revealed that their method extracted class rules more effectively, especially for a case of an increased number of class association candidate rules.Moreover, the classification accuracy of their method achieved sufficient results for traffic prediction systems.Li et al. [23] also combined GNP with a hybrid probabilistic model-building algorithm to avoid premature convergence and local optima while maintaining population diversity.Their experimentally obtained simulation results, evaluated using a small autonomous robot, demonstrated that their method achieved better performance than any conventional algorithm.
Wedashwara et al. [24] combined GNP with standard dynamic programming to solve knapsack problems [25].Their method explored suitable combinations of attributes to create clustering and distributed rules.The experimentally obtained simulation results obtained using six benchmark datasets obtained from machine-learning (ML) repositories clarified that their method presents advantages over the use of conventional clustering algorithms such as k-means, hierarchical clustering, fuzzy C means, and affinity propagation.Moreover, their method was found to be suitable for offline processing that specifically emphasizes optimal results rather than short processing time.
Mabu et al. [26] combined GNP with fuzzy set theory [27] for the detection of network intrusions.Experimentally obtained results using two benchmark datasets revealed that their method provided competitively high detection rates when compared with other ML techniques and GNP with the approach of a current cross-industry standard processing for data mining [28].As the latest study, Mabe et al. [29] combined GNP with a semisupervised learning framework to extract class association rules from a small number of labeled data and from numerous unlabeled data.The experimentally obtained results obtained using several benchmark datasets revealed the classification accuracy of their method as superior to that of conventional methods.
As a graphical model that optimizes parameters and processing structures, GNP is highly independent of classifiers and recognizers.For those reasons, GNP is suitable for combining various existing methods to improve accuracy, especially in practical problems.

Overall System Structure
This study was conducted to improve the recognition accuracy of our originally developed bed-leaving detection and behavior pattern recognition system [6].Our proposed method comprises CPNs combined with GNP that absorbs sensor signal differences as an automatic calibration module.Figure 1 depicts the overall structure of our proposed method, including our originally developed sensor.Sensor signals are obtained from the sensor without an electric power supply because piezoelectric films are used [30].Subsequently, the obtained sensor signals are modified using GNP.Herein, GNP is optimized in advance using original signals and ideal signals obtained from other datasets that provide superior recognition accuracy.We used CPNs to recognize bed-leaving behavior patterns.

Design of GNP Nodes
Figure 2a depicts an example of GNP.As an original population, the initial set of nodes is randomly generated.Although GP and GNP use different genotypes such as a tree structure and a graph network structure, the GP tree depth grows infinitely, which is an important benefit for searching when combined with mutation and crossover for an optimal solution.However, an important shortcoming is that it has low searching efficiency if search ranges are expanded.The fitness of nodes near the root is greater than that of nodes near terminals if mutation or crossover occurs near the root.In the early stage of evolution, convergence to a local minimum occurs if a node near the root is unselected.The number of GNP nodes is invariable during the evolution process because it uses a network structure genotype.The influence of fitness for changing nodes is extremely different in the respective nodes.Two sets of nodes are selected randomly.

2.
Each set of nodes is switched while the connections are maintained.

3.
New fitness values are calculated.
Figure 2c depicts a mutation example that is applied to a particular node like the following.

1.
A node is selected randomly.

2.
A new node is produced randomly.

3.
The existing node is switched to the new node.

4.
A new fitness value is calculated.
Throughout the evolutionary process, GNP automatically generates programs as nodes of two types: a branch node and a processing node that respectively comprise a nonterminal symbol and a terminal symbol of GP.We designed 5 branch nodes and 15 processing nodes for filtering original output sensor signals.Table 1 denotes the branch nodes.Each branch node includes three branches compared with two values.Let a(t) be an input signal, which is discretized as a 8-bit discrete value versus time t, to a branch node.Herein, d in N5 is defined as and d(a) in N5 is defined as Table 1.Originally designed branch nodes of five types.

Counter-Propagation Networks
The rapid progress and development of deep learning (DL) [31] technologies in recent years has contributed remarkably to the classification [32], recognition [33], understanding [34], and prediction [35] of diverse and numerous tasks.With the advent of very deep multilayered backbones such as Inception [36], Xception [37], ResNet [38], ResNeXt [39], and Res2Net [40], the performance and accuracy of DL-based methods significantly outperform those of classical ML-based methods.However, to achieve their full performance, DL-based methods require the combination of large amounts of training and validation data combined with high-dimensional features.Therefore, DL-based methods mainly target large image datasets obtained from various cameras, including depth sensors [41].For low-dimensional features and low-volume datasets, DL-based methods are unsuitable for training and validation because of the complexity of their networks and their numerous parameters.We infer that conventional DL-based methods have an important role and that they can make a meaningful contribution in this application range.
For this study, we used CPNs [7], which are a conventional ML-based method, to classify and to recognize bed-leaving behavior patterns.Input features from the sensors to the input layer unit i (1 ≤ i ≤ I) at time t are x i (t).A weight from i to Kohonen layer unit j (1 ≤ j ≤ J) at time t is w ij (t).Also, a weight from Grossberg layer unit k (1 ≤ k ≤ K) to Kohonen layer unit j at time t is w jk (t).Herein, I, J, and K respectively denote the total numbers of input layer units, Kohonen layer units, and Grossberg layer units.Before learning, w ij (t) are initialized randomly.Using the Euclidean distance between x i (t) and w ij (t), a winner unit c(t) is sought for the following: A neighborhood region N(t) is set from the center of c is where L stands for the maximum learning iteration.Teaching signals to the Grossberg layer units at time t are y k (t).For supervised learning, w ij and w jk in N(t) are updated as where α and β are learning coefficients that decrease along with learning progress.

Sensor and Assignment
Numerous bed sensors [42] and smart bed systems [43] of various types have been proposed.We proposed the bed-leaving detection system [6] based on ML methods obtained using piezoelectric film-type sensors, as depicted in Figure 3a installed on an off-the-shelf bed.The feature of our sensor system is non-restrictive, invisible, cost-effective, and independent of sensor-driven power.For our latest sensor system, we use only five sensors as the minimum assignment structure, as depicted in Figure 3d.Herein, S1-S5 denote labels of the sensor installation positions.To obtain signals from respective sensors, subjects assumed face-up sleeping, right sleeping, left sleeping, longitudinal sitting, lateral sitting, terminal sitting, and left the bed of seven positions as a single pattern switched at 20 s intervals.We built benchmark datasets used for comparative experiments of bedleaving detection.

Target Behavior Patterns
The target behavior patterns for bed-leaving prediction comprise three groupssleeping, sitting, and leaving [6].For this study, we attempt to classify detailed behavior patterns from the responses of six sensors.Sleeping can be of three patterns-face-up sleeping, left sleeping, and right sleeping.Sitting can be of three patterns-longitudinal sitting, lateral sitting, and terminal sitting [44].The total prediction target is to produce seven patterns including leaving.The following are features and estimated sensor responses in each pattern.

Face-up Sleeping
A subject is sleeping on the bed normally to the upper side of the body.Moreover, the person is rolling over on the bed to the right or left side.All the sensors give outputs.Longitudinal Sitting A subject is sitting longitudinally on the bed after rising.The sensor response is mainly the output of S5, which is installed on the hip of the subject.Lateral Sitting A subject is sitting laterally on the bed after turning the body from longitudinal sitting.The sensor response is that S3 and S4 give outputs.They are installed in the right side of the bed.Terminal Sitting A subject is sitting in the terminal position on the bed trying to leave the bed.The sensor response is that none of S1, S2, or S5 gives any output.Moreover, the sensor response is that S3 and S4 give outputs.They are installed near the exit part of the bed.Rapid and correct detection is necessary because of the terminal situation for leaving the bed.
Left the Bed A subject is leaving the bed.The sensor response is that no sensor gives any output.
Longitudinal sitting is a behavior pattern by which a subject sits up.In numerous cases, a person will return to sleeping.In lateral sitting, a person will move to leave from their bed because they move to turn the body to the terminal.Therefore, our system must determine lateral sitting immediately to predict instances in which a person leaves the bed.Moreover, rapid and correct detection is necessary because of the terminal situation for leaving the bed if a subject moves to longitudinal sitting.We consider that our system can protect patients from injury or accidents caused by falling from the bed because it can detect such phenomena before a subject leaves completely.

Output Signals and Preprocessing
To demonstrate the usefulness of our method, we selected a subject for which the accuracy was 31.9 percentage points lower than those of other subjects in our earlier study [6].Figure 4   Table 3 presents recognition accuracies obtained from one person whose body weight is the lowest among ten subjects.The mean recognition accuracy is 41.4%.We used Datasets 4, 5 and 6 for the application experiment, as described in Section 6.

Setup and Evaluation Criteria
We applied GNP to low-accuracy sensor signals for the correction of high-accuracy sensor signals as ideal sensor signals.This optimization is based on evolutionary image processing [45].The optimization goal of this image processing was set to ideal images that were selected from ground-truth image datasets.Although ideal sensor signals differ among subjects, we inferred that accuracy had improved if low-accuracy sensor signals were approximated to high-accuracy sensor signals.We set high-accuracy and low-accuracy sensor signals from benchmark datasets in our earlier study [6] as ideal sensor signals and target sensor signals for this optimization experiment.We used a single channel from five sensor signals.
For this experiment, we evaluated the hypothesis that accuracy of bed-leaving detection will improve filtering with a suitable combination.We defined lower fitness values as approximated ideal sensor signals that approximate low-accuracy sensor signals to high-accuracy sensor signals.Let s ideal and s test respectively denote an ideal sensor signal and a test sensor signal at time t.Fitness f a (t) at time t is defined as where N represents the total number of sensor signals.

Parameters
Table 4 presents the initial setting of GNP parameters.The parameters O D , O P , O G , O C , O M , O E , P C and P M respectively represent the number of branch nodes, the number of processing nodes, the maximum generation, the number of crossovers, the number of mutation individuals, the number of elite individuals, crossover probability and mutation probability.We set them empirically through several trials based on an earlier report of the relevant literature [18].Parameter optimization using methods such as GA persists as an important future task.

Results and Discussion
Figure 5 exhibits a generated graph network that comprises one branch node and six processing nodes.Numbers 1-4 and Numbers 5-20 respectively represent branch nodes and processing nodes.Results demonstrate that the fitness at the 150th epoch was 13.56% higher than that of the 300th epoch.However, the fitness at the 170th epoch and later epochs was almost unchanged until the definitive epoch.Therefore, we infer that the optimal value was reached at approximately the 170th epoch.However, the fitness converged insufficiently.
We consider that this convergence is attributable to the wide feature difference between the high-accuracy sensor signals and the low-accuracy sensor signals.

Application Experiment 6.1. Setup and Evaluation Criteria
As the evaluation criterion for the results of this experiment, we used recognition accuracy obtained from CPNs as a measure of fitness for optimizing sensor signals.In a report of our earlier study [6], original sensor signals were presented to CPNs to measure the recognition accuracy.This study was conducted to improve the overall system accuracy using GNP as an evolutionary learning approach.From 10 subjects who participated in our earlier study, we selected evaluation targets for this study: six datasets of people for whom the recognition accuracy was the lowest [6].We used leave-one-out cross-validation to evaluate our method when used along with ML and evolutional learning approaches.
For this experiment, we set f b as Intermediate output y(i) comprises a binary function as where g(t) is a ground-truth signal at time t.
For this experiment, we infer that our method can correct original signal features, which include noise for negative effects on accuracy, with preservation of salient features for the recognition of bed-leaving behavior patterns.From six datasets, we used the third, fourth and sixth datasets, which had low accuracies.

Parameters
Table 5 presents parameters that were set based on results of a preliminary experiment.We reduced the maximum generation, individual and mutation to mitigate computational costs for various signal patterns.We used the same setting values for the number of elites, crossover probabilities and mutation probabilities.

Results and Discussion
Figures 7a, 8a and 9a respectively portray time series fitness changes of the applied filter sets obtained using GNP for Datasets 4, 5, and 6.In the first half of the transitions up to the tenth epoch, the fitness of our method was lower than the original recognition accuracy.Subsequently, fitness retained high scores with variation.For this experiment, the maximum generation is set to 50 epochs for the iteration of evolutionary learning.Fitness improved slightly in the last half of the transition.Figures 7b, 8b and 9b portray the generated graph networks.Graph networks generated from Datasets 4, 5, and 6 respectively comprise 2, 4, and 4 branch nodes and 8, 9, and 12 processing nodes.
Table 6 presents results obtained from comparison of recognition accuracies from f b for original signals and filtered signals.As optimization results, the improved accuracies for Datasets 4, 5, and 6 are, respectively, 27.22%, 11.49% and 17.94%.The mean improved accuracy was 18.88% for the three datasets using our method.

Detailed Analysis of Parameters and Nodes
This experiment was designed to improve recognition accuracy obtained from f b based on improved GNP parameters.For parameter optimization, a high burden of computational cost is necessary if all parameters are targeted.We specifically examined two parameters: O M , which controls the number of mutation; and O C , which controls the number of crossovers.Moreover, we examined the optimization of filter sets and the node selection calculated from the utilization frequency.

Parameter of Mutation
We optimized O M for Datasets 4, 5 and 6.Table 7 presents recognition accuracies with five intervals from 10 to 50.The maximum accuracies of Datasets 4, 5 and 6 were obtained respectively in O M = 45, 40, and 40.Nevertheless, these results demonstrated, respectively, that the mean improved accuracies for Datasets 4, 5 and 6 were 0.36%, 0.92% and 0.97%.These results addressed that the effects of accuracy for this parameter were tiny when considering improved accuracy.

Parameter of Crossover
For optimization of O C , we targeted only Dataset 6 in consideration of the computational costs.Table 8 shows recognition accuracies of 100-400 with 100 intervals.The improved accuracies presented in the third column were increased according to the number of O C .However, the fourth column shows the sharply increased computational time.Regarding the relation between accuracy and computational cost, we inferred that O M = 200 is the most suitable for our sensor system.

Branch Node
Numerous derivatives of branch nodes can be designed.However, we have designed branch nodes manually.Automatic generation of branch nodes has not yet been achieved.For this experiment, we tested the property that the number of derivatives is limited.We added four branched nodes, N21-N24, to the existing branch nodes as shown in Table 9.The definitions of the two formulas are presented below: Table 10 denotes the top five recognition accuracies of the added branch nodes for Dataset 6.The maximum recognition accuracy of 50.00% was obtained in the additional case of N22 and N24.The recognition accuracy was 4.05% higher than that of 48.05% before the addition.Table 11 presents the combination of the respective branch nodes and the number of branch nodes used for the application experiment in the previous section.As a utilization tendency, N1 and N2, which compare closed neighbor sensor signals, are used up to one time.By contrast, N3, N4, and N5, which compare wide sensor signals, are used two or three times.Table 12 shows the top five recognition accuracies after changing N1 and N2 to the new branch nodes, as denoted in Table 10.The maximum recognition accuracy of 50.50% was obtained in the case which exchanged N2 and N24.The recognition accuracy was 5.10% higher than that before the exchange.

Processing Node
As with branch nodes, we examined the properties of a limited number of derivatives of processing nodes.For this experiment, we added five processing nodes, N25-N29, to the existing processing nodes as shown in Table 13 Table 14 shows the top five recognition accuracies of the added processing nodes for Dataset 6.The maximum recognition accuracy of 50.41% was obtained in the additional case of N25 and N26.The recognition accuracy was 4.91% higher than that before the addition.Table 15 presents the number of used processing nodes.As a utilization tendency, N7, N8, and N9 process slight signal changes used only one time.In contrast, N15, N18, and N19 process signal changes applied for neighbor sensor signals, used three times.Other nodes were used twice.
The modified sensor signals are presented to CPNs for the training mode of a supervised manner.After training, the network weights on CPNs are fixed.The operation mode of CPNs is then switched from training to validation.Behavior patterns are recognized by CPNs for input sensor signals.For this mode, GNPs are used as a filter.Herein, both GNP and CPNs run rapidly in real time because updating of network structures and weights are terminated for the validation mode.

Figure 1 .
Figure 1.Overall structure of our proposed method including our originally developed sensor.

Figure
Figure2bdepicts a crossover example that is applied between two sets of nodes as the following.1.Two sets of nodes are selected randomly.2.Each set of nodes is switched while the connections are maintained.3.New fitness values are calculated.
portrays the original sensor signals of the subject.Herein, we set the sampling rate to 50 Hz for recording of the sensor signals.We obtained 7000 signals in each dataset during 140 s.The vertical and horizontal axes in the figures respectively depict the sensor output voltage and signals.From the 6000th to 7000th signals, we can infer that the subject left the bed completely.Sensor signals show no output in this range because there is no load to the sensors.Therefore, we removed this range from the processing target as filtering.

Figure 4 .
Figure 4. Output signals in respective sensors.
Figure 5 exhibits a generated graph network that comprises one branch node and six processing nodes.Numbers 1-4 and Numbers 5-20 respectively represent branch nodes and processing nodes.Figure 6 depicts the original sensor signals and filtered sensor signals after application of the graph network.Results demonstrate that the fitness at the 150th epoch was 13.56% higher than that of the 300th epoch.However, the fitness at the 170th epoch and later epochs was almost unchanged until the definitive epoch.Therefore, we infer that the optimal value was reached at approximately the 170th epoch.However, the fitness converged insufficiently.

Figure 5 .
Figure 5. Experimentally obtained results of optimizing sensor signals to approximate high-accuracy ideal signals.

Figure 7 .
Figure 7. Results of time series fitness changes and generated graph networks for Dataset 4.

Figure 8 .
Figure 8. Results of time series fitness changes and generated graph networks for Dataset 5.

Figure 9 .
Figure 9. Results of time series fitness changes and generated graph networks for Dataset 6.

Table 2 .
Originally designed processing nodes of 15 types.

Table 3 .
Recognition accuracy in respective datasets.The underlines indicate used datasets.

Table 4 .
Initial setting of GNP parameters.

Table 6 .
Improved recognition accuracies obtained from f b .

Table 7 .
Optimization experimentally obtained results for O M .

Table 8 .
Optimization experimentally obtained results for O C .

Table 9 .
Optimization experimentally obtained results for O C .

Table 10 .
Top five recognition accuracies of the added branch nodes.

Table 11 .
Number of branch nodes used.

Table 12 .
Top five recognition accuracies after changing branch nodes.

Table 14 .
Top five recognition accuracies of the added processing nodes.

Table 15 .
Number of processing nodes used.

Table 16 .
Top five recognition accuracies after changing processing nodes.