Classification of Standing and Walking States Using Ground Reaction Forces

The operation of wearable robots, such as gait rehabilitation robots, requires real-time classification of the standing or walking state of the wearer. This report explains a technique that measures the ground reaction force (GRF) using an insole device equipped with force sensing resistors, and detects whether the insole wearer is standing or walking based on the measured results. The technique developed in the present study uses the waveform length that represents the sum of the changes in the center of pressure within an arbitrary time window as the determining factor, and applies this factor to a conventional threshold method and an artificial neural network (ANN) model for classification of the standing and walking states. The results showed that applying the newly developed technique could significantly reduce classification errors due to shuffling movements of the patient, typically noticed in the conventional threshold method using GRF, i.e., real-time classification of the standing and walking states is possible in the ANN model. The insole device used in the present study can be applied not only to gait analysis systems used in wearable robot operations, but also as a device for remotely monitoring the activities of daily living of the wearer.


Introduction
Walking is necessary for performing most of our daily activities. However, gait disturbances may occur due to neurological disorders, such as spinal cord disorder, stroke, and Parkinson's disease, or accidents such as a fall. Gait disturbance can cause significant discomfort in performing the activities of daily living (ADL); thus, gait rehabilitation is absolutely necessary to improve the quality of life of patients suffering from gait disturbance [1,2]. Conventional gait rehabilitation methods are based on the concept of simple and repetitive physical therapy assisted by rehabilitation therapists, and consequently, the treatment outcome may vary depending on the skill and experience of the therapist. Accordingly, studies have been conducted to operate gait rehabilitation robots using actuators and determine the motion intention by receiving feedback from the bio-signals of the patients to achieve more effective and quantifiable gait rehabilitation effect.
To ensure the effective operation of gait rehabilitation robots, it is essential to apply an algorithm that can detect the gait phase of the wearer [3,4]. Various methods have been developed for gait phase detection, including applying a heuristic threshold algorithm using empirically set thresholds or machine learning for detecting the gait phase after acquiring various bio-signals by using the ground reaction force (GRF), accelerometer (Acc), and gyrosCOPe (Gyro) [5][6][7][8].
Algorithms that detect the gait phases using GRF often use the method of detecting the gait phase transition when the GRF measured at the heel or metatarsal bone exceeds a certain threshold. Mariani et al. [6] set the GRF threshold based on the body weight of the insole wearer, whereas Catalfamo et al. [7] set the threshold using the ratio between the maximum and minimum GRF values. Moreover, Yu et al. [8] classified the gait phase using the experiment operator pressed a synchronization signal generation button at the start and end of each experiment to generate a constant voltage trigger signal of 5 V and 0 V, respectively. The trigger signals were saved along with the GRF data and positional data of the motion capture markers to establish the reference points for synchronization. Upon completion of the experiment, the data at the starting and ending points of the experiment, as set by the trigger signals, were interpolated to obtain uniform numbers of data in the same time interval. The acquired GRF data were used for state classification, and the motion capture marker position data were used as the reference data for the actual state classification. Python was used for post-processing of the data acquired by the data acquisition system (DAS).

Participants
The study population for the gait experiments included 32 participants: 28 healthy adults and 4 patients with stroke-induced hemiplegia to evaluate the effect of shuffling on the classification accuracy of standing and walking states ( Table 1). The healthy adult group comprised 19 males (age 25 ± 3 years, height 1.75 ± 5.82 m, weight 68 ± 7 kg) and 9 females (age 21 ± 1 years, height 1.61 ± 4.22 m, weight 51 ± 4 kg), who were capable of normal ambulation and had no trauma or neurological disorder. The GRF measurement device was developed by the authors of the present study. It consisted of an insole equipped with FSRs (FSR 402, Interlink Electronics, Inc. CA 93012, USA), which was inserted into the shoe [9]. Details of the insole device are explained in Appendix A. The GRF and motion capture data were collected using a data acquisition system (NI 6259, National Instruments, TX 78759-3504, USA). Because the GRF measurement device and motion capture system used in the study have different data sampling rates (100 Hz and 30 Hz, respectively), data synchronization was needed. Accordingly, the experiment operator pressed a synchronization signal generation button at the start and end of each experiment to generate a constant voltage trigger signal of 5 V and 0 V, respectively. The trigger signals were saved along with the GRF data and positional data of the motion capture markers to establish the reference points for synchronization. Upon completion of the experiment, the data at the starting and ending points of the experiment, as set by the trigger signals, were interpolated to obtain uniform numbers of data in the same time interval. The acquired GRF data were used for state classification, and the motion capture marker position data were used as the reference data for the actual state classification. Python was used for post-processing of the data acquired by the data acquisition system (DAS).

Participants
The study population for the gait experiments included 32 participants: 28 healthy adults and 4 patients with stroke-induced hemiplegia to evaluate the effect of shuffling on the classification accuracy of standing and walking states ( Table 1). The healthy adult group comprised 19 males (age 25 ± 3 years, height 1.75 ± 5.82 m, weight 68 ± 7 kg) and 9 females (age 21 ± 1 years, height 1.61 ± 4.22 m, weight 51 ± 4 kg), who were capable of normal ambulation and had no trauma or neurological disorder. The hemiplegia group comprised 4 males belonging to the functional ambulation category (FAC) level 5, who were capable of independent ambulation of 10 m without an assistive device.

Test Method
The participants in the gait experiment remained in the standing position while facing forward, and when prompted to start walking by the operator, they walked a distance of 5 m on a flat ground and stopped at the marked position. The participants were allowed to arbitrarily select how long they would stay in the standing state and their walking speed. Each participant repeated the gait experiment a total of 10 times.
The experimental protocol was approved by the Institutional Review Board (IRB) at the Korea Institute of Science and Technology (KIST). All participants provided written informed consent for the study prior to participation.

Candidate Factors to Overcome Errors Caused by Foot Drop
When shuffling occurs due to foot drop, the magnitude of the GRF measured by an individual FSR is greatly affected, but the effect on the COP is relatively less because the COP is calculated using the GRF data measured by multiple FSRs. Accordingly, the present study aimed to use the COP for state classification. As shown in Figure 2, the GRF data were used to calculate the positions of the COP as follows.
Here, COP X and COP Y denote the positions of the combined COP in the x-and y-axis directions, respectively; COP LX and COP RX denote the positions of the COP in the x-axis direction, measured from the left and right foot, respectively; and COP LY and COP RY represent the positions of the COP in the y-axis direction, measured from the left and right foot, respectively. Regarding the sensor position (SP), the values defined by the authors in the previous study were used as the positional coordinates of the FSR [9]. With respect to the coordinate axes, the x-and y-axis were defined as the left/right and forward/backward directions when the body was facing forward, respectively. When shuffling occurs due to foot drop, the magnitude of the GRF m individual FSR is greatly affected, but the effect on the COP is relatively les COP is calculated using the GRF data measured by multiple FSRs. Accordi sent study aimed to use the COP for state classification. As shown in Figu data were used to calculate the positions of the COP as follows.  As shown in Figure 2, as the participants began walking, the positions of the COPs of the left and right feet, projected on the surface, shifted by repeatedly alternating between the forward/backward directions. The angle (θ) was formed by the segment connecting these two points and the frontal plane, and COP gradient was calculated using the equation below. In this equation, L, which was defined as the distance between the left and right feet, was assumed to be the same as the width of the hips (Figure 2), and its value was set based on the height of the participant [22].
The amount of change in COP gradient over time was derived by dividing COP gradient by the sampling rate of the FSRs.

Selection of Factor Based on Approximate Entropy
Entropy is reported to be a measure of the complexity of the deterministic dynamics of a time series [23]. In the field of gait analysis, the entropy of the COP value is used to test the therapeutic effect of rehabilitation or as an index for distinguishing between healthy adults and patients. Schmit et al. [24] compared the COP variations of patients with Parkinson's disease against those of healthy elderly persons and determined that the former have relatively lower complexity in the COP variations. A study by Bar-Haim et al. [20] showed that the entropy of COP increased when the gait function of the patients was improved. Such results indicated that the pattern of change in the COP that appears during gait might be different between healthy adults and patients. Hence, applying the COP data from patients to an algorithm for gait detection developed using the COP data of healthy adults may not yield accurate detection results [15]. Therefore, unlike gait complexity assessment, it is necessary to identify the factors that do not show a significant difference between healthy adults and patients for state classification. COP X , COP Y , COP LX , COP RX , COP LY , COP RY , COP gradient , and .
COP obtained from the GRF data were used to calculate the entropy values for healthy adult and patient groups; the results are shown in Figure 3. The approximate entropies (ApEn) of the variables listed above were calculated using the following steps.
4. The cumulative entropy was used to calculate ApEn by the following equation.
In Figure 3, the factor that showed the smallest difference in entropy between the two groups was , which represents the amount of change in . In other words, the results indicated that is the most appropriate factor for state classification. The explanation of the application of the entropy for is introduced in Appendix B.

Waveform Length of
has a value of zero when the two feet alternate during gait or when standing with both feet parallel to each other. Therefore, the standing and walking states cannot be differentiated by calculating and comparing the values. To rectify this issue, the waveform length was derived by combining within an arbitrary time window and using it for state classification, as shown below [25].
= (13) In other words, the gait data from the previous step are used when classifying the current walking state using . 1. m number of sample data X(i), as defined by the pattern length, were generated.
2. The generated sample data were used to calculate their correlations by the following equation.
3. After determining the log of the correlation value, the mean log value was used to derive the cumulative entropy.
4. The cumulative entropy was used to calculate ApEn by the following equation.
In Figure 3, the factor that showed the smallest difference in entropy between the two groups was . COP, which represents the amount of change in COP gradient . In other words, the results indicated that . COP is the most appropriate factor for state classification. The explanation of the application of the entropy for . COP is introduced in Appendix B. COP COP gradient has a value of zero when the two feet alternate during gait or when standing with both feet parallel to each other. Therefore, the standing and walking states cannot be differentiated by calculating and comparing the . COP values. To rectify this issue, the waveform length was derived by combining . COP within an arbitrary time window and using it for state classification, as shown below [25].
In other words, the gait data from the previous step are used when classifying the current walking state using COP W . The Timing Analysis Module (TAM) method [7,8] used in previous studies was used to differentiate between the standing and walking states. This method determines the contact between the foot and ground based on the magnitude of the GRF, and the threshold is calculated using the following equation.
Here, GRF max and GRF min represent the maximum and minimum values of the sum of GRFs measured by multiple FSRs, respectively. Because the GRF data were applied with the participants segregated into the healthy adult and patient groups, GRF max and GRF min were different for each group. The TAM method classifies the state as the standing state when the sum of the GRFs measured is greater than GRF TH from the above equation; otherwise, the state is classified as the walking state.
Using COP w Threshold After setting the COP W threshold (COP W.TH ), the following criteria were applied to define the standing and walking states as 0 and 1, respectively. Figure 4 shows the probability of COP W , which was calculated using the GRF data generated in the standing and walking states. In the histograms shown in Figure 4, COP W.TH was determined as COP W with the highest probability in the area of overlap of the standing and walking states. Therefore, the healthy adult and patient groups have different threshold values, as shown in Figure 4a,b. The state determined using Equation (15) was compared with the actual state determined by a motion capture system to assess the accuracy of the state classification technique proposed in the present study.

Artificial Neural Network Model
For comparison with the aforementioned threshold method, a machine learningbased state classification model was developed, as shown in Figure 5. In the ANN model, GRF, COP X , COP Y , COP LX , COP RX , COP LY , COP RY , COP gradient , . COP, and COP W were used as the input data, while supervised learning was performed by applying the state classification results from the motion capture system as the learning data. The learning data were normalized by dividing by the maximum value that appeared for each type of input data to reduce the influence due to the size of each data value. The ANN model was developed as a single layer to allow the use of Garson's algorithm for assessing the relative importance of the factors, and it consisted of 20 nodes. In the model for state classification of the healthy adult group, 200 sets of experimental data randomly selected from a total 280 sets of gait experiment data were used for model learning, and the remaining 80 sets of experimental data were used for state classification. In the model for state classification of the patient group, 30 sets of experimental data randomly selected from 40 sets of gait experiment data were used for model learning, and the remaining 10 sets of experimental data were used for state classification.

Using Threshold
After setting the threshold ( . ), the following criteria were applied to define the standing and walking states as 0 and 1, respectively.  Figure 4 shows the probability of , which was calculated using the GRF data generated in the standing and walking states. In the histograms shown in Figure 4, . was determined as with the highest probability in the area of overlap of the standing and walking states. Therefore, the healthy adult and patient groups have different threshold values, as shown in Figure 4a,b. The state determined using Equation (15) was compared with the actual state determined by a motion capture system to assess the accuracy of the state classification technique proposed in the present study.

Artificial Neural Network Model
For comparison with the aforementioned threshold method, a machine learningbased state classification model was developed, as shown in Figure 5. In the ANN model,  GRF,  ,  ,  ,  ,  ,  ,  , , and were used as the input data, while supervised learning was performed by applying the state classification results from the motion capture system as the learning data. The learning data were normalized by dividing by the maximum value that appeared for each type of  input data to reduce the influence due to the size of each data value. The ANN model was developed as a single layer to allow the use of Garson's algorithm for assessing the relative importance of the factors, and it consisted of 20 nodes. In the model for state classification of the healthy adult group, 200 sets of experimental data randomly selected from a total 280 sets of gait experiment data were used for model learning, and the remaining 80 sets of experimental data were used for state classification. In the model for state classification of the patient group, 30 sets of experimental data randomly selected from 40 sets of gait experiment data were used for model learning, and the remaining 10 sets of experimental data were used for state classification. Moreover, Garson's algorithm was applied to the factors used in the ANN model to assess the relative importance of each factor [26,27]. The relative importance of each input factor used in the model created after the completion of learning was calculated by the following equation. Relative importance represents a relative value and the sum of the relative importance of all input factors used in a single system should be 100%.

Results
According to a study by Pappas et al. [15], gait analysis algorithms for treatment or rehabilitation, which show a classification accuracy of <90%, are difficult to use in actual clinical practice. Accordingly, the present study set the goal of achieving a classification accuracy of ≥90% for the state classification algorithm developed in the present study. Moreover, Garson's algorithm was applied to the factors used in the ANN model to assess the relative importance of each factor [26,27]. The relative importance of each input factor used in the model created after the completion of learning was calculated by the following equation. Relative importance represents a relative value and the sum of the relative importance of all input factors used in a single system should be 100%.

Results
According to a study by Pappas et al. [15], gait analysis algorithms for treatment or rehabilitation, which show a classification accuracy of <90%, are difficult to use in actual clinical practice. Accordingly, the present study set the goal of achieving a classification accuracy of ≥90% for the state classification algorithm developed in the present study. Figure 6 shows the results of the state classification accuracy obtained in the present study. The mean state classification accuracies in the gait experiments on the healthy adult group were 98.52% and 95.69% when using the TAM method and threshold method using COP W , respectively, showing that both methods exceeded the target classification accuracy of ≥90%. In the healthy adult group, the classification accuracies for the standing and walking states were higher when the TAM method was used, when compared with the threshold method using COP W . This could be attributed to the fact that the threshold method using COP W is influenced by the previously collected data when calculating the waveform length within an arbitrary time window. Therefore, such methods may not only incorrectly classify the current walking state, but also show classification delay. Figure 6 shows the results of the state classification accuracy obtained in the present study. The mean state classification accuracies in the gait experiments on the healthy adult group were 98.52% and 95.69% when using the TAM method and threshold method using , respectively, showing that both methods exceeded the target classification accuracy of ≥90%. In the healthy adult group, the classification accuracies for the standing and walking states were higher when the TAM method was used, when compared with the threshold method using . This could be attributed to the fact that the threshold method using is influenced by the previously collected data when calculating the waveform length within an arbitrary time window. Therefore, such methods may not only incorrectly classify the current walking state, but also show classification delay.

State Classification Accuracy When Using Threshold Methods
The mean state classification accuracies in the gait experiments on the patient group were 91.52% and 95.05% when using the TAM method and , respectively, showing that both methods exceeded the target classification accuracy of ≥90%. However, the classification accuracy for the walking state (P-walk. in Figure 6) obtained using the TAM method was unsatisfactory at 87.22%. This may be attributed to the misinterpretation of the walking state as standing state due to shuffling by the patients when the GRF was measured in the swing foot. Figure 7 shows the GRF data collected from gait experiments on the healthy adult and patient groups. The graphs show the sum of the GRFs of both feet in the standing state and the GRF of the swing foot in the walking state. In Figure 7a, which shows the GRF data for the healthy adult group, the mode value of the GRFs for the standing and walking states are separated from each other, whereas in Figure 7b, which shows the GRF data for the patient group, some of the GRF values measured at the swing foot overlaps with the mode value region of the GRF in the standing state. This indicated that the GRF was measured when shuffling occurred in the swing foot; consequently, an error occurred where the standing state was detected despite the fact that the patient was actually walking, which caused the state classification accuracy to decrease.
On the other hand, the classification accuracy of the threshold method using for the walking state of the patient group (P-walk. in Figure 6) was high, reaching up to 95.50%. It is believed that such results were due to significant reduction in errors caused by shuffling by applying the COP-based factors, as intended by the authors.  The mean state classification accuracies in the gait experiments on the patient group were 91.52% and 95.05% when using the TAM method and COP W , respectively, showing that both methods exceeded the target classification accuracy of ≥90%. However, the classification accuracy for the walking state (P-walk. in Figure 6) obtained using the TAM method was unsatisfactory at 87.22%. This may be attributed to the misinterpretation of the walking state as standing state due to shuffling by the patients when the GRF was measured in the swing foot. Figure 7 shows the GRF data collected from gait experiments on the healthy adult and patient groups. The graphs show the sum of the GRFs of both feet in the standing state and the GRF of the swing foot in the walking state. In Figure 7a, which shows the GRF data for the healthy adult group, the mode value of the GRFs for the standing and walking states are separated from each other, whereas in Figure 7b, which shows the GRF data for the patient group, some of the GRF values measured at the swing foot overlaps with the mode value region of the GRF in the standing state. This indicated that the GRF was measured when shuffling occurred in the swing foot; consequently, an error occurred where the standing state was detected despite the fact that the patient was actually walking, which caused the state classification accuracy to decrease. as the factor for classifying the states in the patient group will be more effective than using GRF with the threshold method.
Overall, relatively higher classification accuracies were achieved by the TAM method using GRF for the healthy adult group (98.52%) and the threshold method using for the patient group (95.05%). Moreover, applying the threshold method using showed very high mean state classification accuracies of 95.69% and 95.05% for the healthy adult and patient groups, respectively, which suggests its applicability to actual clinical experiments. Figures 8 and 9 show the GRF data measured in the gait experiments on the healthy adult and patient groups, respectively, and and calculated from these data, along with the examples of state classification by the two methods-the TAM method and threshold method using . Figures 8e and 9e show the actual state classification   On the other hand, the classification accuracy of the threshold method using COP W for the walking state of the patient group (P-walk. in Figure 6) was high, reaching up to 95.50%. It is believed that such results were due to significant reduction in errors caused by shuffling by applying the COP-based factors, as intended by the authors.
In Table 2, the percentile of the GRF mode values in the walking state, measured by the TAM method, were 96.00% and 89.50% for the healthy adult and patient groups, respectively. Both groups also showed similar state classification accuracies of 98.56% and 87.22%, respectively. Moreover, the percentile of the GRF mode values in the standing state, measured by the threshold method using COP W , were 90.00% and 94.50% for the healthy adult and patient groups, respectively; both groups also showed very similar state classification accuracies of 91.26% and 94.52%, respectively. Such results indicate that it is easier to classify between the standing and walking states when there is a greater separation between the datasets generated in those states. Therefore, it is inferred that using COP W as the factor for classifying the states in the patient group will be more effective than using GRF with the threshold method. Overall, relatively higher classification accuracies were achieved by the TAM method using GRF for the healthy adult group (98.52%) and the threshold method using COP W for the patient group (95.05%). Moreover, applying the threshold method using COP W showed very high mean state classification accuracies of 95.69% and 95.05% for the healthy adult and patient groups, respectively, which suggests its applicability to actual clinical experiments. Figures 8 and 9 show the GRF data measured in the gait experiments on the healthy adult and patient groups, respectively, and . COP and COP W calculated from these data, along with the examples of state classification by the two methods-the TAM method and threshold method using COP W . Figures 8e and 9e show the actual state classification results (actual states) of the motion capture system and those of the TAM method and threshold method using COP W together for comparison. In Figure 8e, which shows the gait experiment results for the healthy adult group, both the TAM method and threshold method using COP W showed very similar results as the actual state classified by the motion capture system. The TAM method accurately classified the start and end of walking, with occasional error in misinterpreting the walking state as the standing state. The threshold method using COP W showed superior state classification accuracy than the TAM method, but it also showed delay in classifying the transition from the walking state to the standing state. This classification delay was due to using the data from the previous gait step when calculating COP W , as described earlier, and additional time was required to avoid this influence.     In Figure 9e, which shows the gait experiment results for the patient group, several classification errors occurred when the TAM method was used for state classification. This classification error was due to the patient group showing shuffling of the swing foot during walking, which caused the walking state to be misinterpreted as the standing state. On the other hand, the threshold method using COP W showed a sharp decrease in the frequency of state classification errors and significant improvement in the classification accuracy, even in the patient group.

State Classification Accuracy by Machine Learning
As shown in Figure 6, the ANN model demonstrated very high mean state classification accuracies of 99.23% and 98.33% for the healthy adult and patient groups, respectively. In comparison with the threshold method using COP W , the classification accuracy increased by 3.54% and 3.28% for the healthy adult and patient groups, respectively, and there was no noticeable classification delay. Figure 10 shows the results of the relative importance of the input factors used in the ANN model, calculated using Equation (16). As shown in Figure 10, the factor with the highest relative importance in both the healthy adult and patient groups was COP W . All other factors showed a relative importance within the range of 0.045-0.09 in both groups, whereas COP W showed a relative importance of 0.11 and 0.30 in the healthy adult and patient groups, respectively, which confirmed that it was the most important factor in both groups. Especially in the state classification model for the patient group, the relative importance of COP W was much greater than that of all other factors. Based on these results, it was determined that using COP W as the factor for machine learning-based state classification was the right decision. Figure 10 shows the results of the relative importance of the input factors used in the ANN model, calculated using Equation (16). As shown in Figure 10, the factor with the highest relative importance in both the healthy adult and patient groups was . All other factors showed a relative importance within the range of 0.045-0.09 in both groups, whereas showed a relative importance of 0.11 and 0.30 in the healthy adult and patient groups, respectively, which confirmed that it was the most important factor in both groups. Especially in the state classification model for the patient group, the relative importance of was much greater than that of all other factors. Based on these results, it was determined that using as the factor for machine learning-based state classification was the right decision.

Discussion
A recent study by Tang et al. [5] used three different threshold values for distinguishing between the standing and walking states, and proposed a method of tuning the threshold values at each step by using the maximum and minimum GRF values from the previous step, which they referred to as the self-tuning triple threshold algorithm (STTTA). However, STTTA had the inherent limitation of decreased state classification accuracy due to shuffling of the swing foot in the patient group. Djamaa et al. [28] used the GRF to classify the walking state as shuffle walk, toe walk, and normal walk, and demonstrated that such classification could be useful in diagnosing the presence of a disorder. However, this method too could not avoid the classification error caused by shuffling.
On the other hand, the application of COP W , which was introduced as a new factor in the present study, to the threshold method yielded high mean state classification accuracies of 95.69% and 95.05% in the experiments on the healthy adult and patient groups, respectively, which indicated significant reduction in classification errors caused by shuffling. Figure 11 shows the state classification by applying the experimental data shown in Figures 8 and 9 to the ANN model. The results showed almost no state classification error. Moreover, the ANN model using COP W as the factor showed no classification delay, unlike the threshold method using COP W . Table 3 shows the delay in the state classification time in all gait experiments. The start and end time points of walking represented the time points when the motion capture marker placed on the solar plexus moved in the direction of walking, and the time delay was defined as the difference in time between these time points, observed by the motion capture system, and the time points for completion of state classification by the algorithm developed in the present study. Table 3 shows the delay in the state classification time in all gait experiments. The start and end time points of walking represented the time points when the motion capture marker placed on the solar plexus moved in the direction of walking, and the time delay was defined as the difference in time between these time points, observed by the motion capture system, and the time points for completion of state classification by the algorithm developed in the present study. Figure 11. Comparison of the classification results using the test data: (a) healthy adults (b) patients. Figure 11. Comparison of the classification results using the test data: (a) healthy adults (b) patients. The most prominent gait characteristics of the patient group were (1) the time that the foot stayed in contact with the ground was relatively longer than that in the healthy adult group, owing to shuffling of the affected foot; (2) when the affected foot was lifted, a significant weight shift occurred to the unaffected foot. Therefore, when the GRF is used for state classification in the patient group, the foot touches down on the ground after a time delay owing to shuffling of the affected foot. Consequently, there is a delay in detecting the start of walking; the mean classification delay was found to be 52.1 ms. At the end of walking, the swing foot touches down on the ground earlier due to shuffling, when compared with the healthy adult group. Consequently, the classification process prematurely assumes that the participant is in the standing state; the mean classification delay was found to be −283.4 ms. The state classification delays in the healthy adult group when classified by the GRF were −11.8 ms and −2.6 ms at the start and end of walking, respectively. Because these classification delays were negligible, the results could be considered as real-time classification.
The threshold method using COP W showed the mean state classification delay at end of walking as 193.3 ms and 139.3 ms in the healthy adult and patient groups, respectively. There were two causes for this classification delay. The first cause was the fact that the waveform length was derived by a method that uses the sum of data within an arbitrary time window. Therefore, it was influenced by the data from the previous time window. In such cases, the calculation included the data from the previous walking state, even though the participant had already stopped, and, thus, the results may have continued to show the participant in the walking state. The second cause is that even when the participant stops walking, changes in the COP may continue to occur owing to the shaking of the body until the participant comes to a complete stop. Such changes may be reflected in COP W and the results may continue to show the participant in the walking state.
The mean time delay at the start of walking was −24.8 ms and −155.5 ms in the healthy adult and patient groups, respectively, meaning that state classification occurred before the start of walking in both groups. In the patient group, when the affected foot was lifted, excessive weight shift occurred to the unaffected foot. This caused a sudden increase in the amount of change in the COP before the knee movement, which could have been classified as the walking state. In the healthy adult group, anticipatory postural adjustments (APAs) appear, which are slight movements to maintain the balance before the body moves [29]. In other words, when the participants in the healthy adult group began walking from the standing position, the COP that was positioned between the two feet entered an imbalance phase of moving toward the heel of the swing foot before walking began. In the healthy adult group, such changes in the COP influenced COP W , whereby the start of walking was classified prematurely. When the ANN model was used, the time delay in state classification showed an absolute value of <10 ms regardless of the group and type of walking state. Therefore, classification using the ANN model can be considered as real-time state classification. In Figure 6, the results of state classification using the ANN model showed very high mean classification accuracies of 99.23% and 98.33% in the healthy adult and patient groups, respectively. Therefore, the ANN model developed in the present study can be viewed as a technique capable of real-time state classification with very high state classification accuracy, suggesting its suitability for application in clinical practice.
The lower classification accuracy of the threshold method using COP W for the standing state in the healthy adult group when compared with the other cases, as shown in Figure 6, can be explained based on the occurrence of APAs. In other words, the COP changed as the body wavered in the standing state, which would show a very similar pattern as the change in COP due to APAs before the start of walking. Therefore, wavering of the body in the standing state may have been erroneously classified as the walking state.
The method using COP W and the TAM method both require boolean-type logical comparison calculations, whereas the ANN model goes through the matrix calculation, so the amount of calculation is relatively increased compared to the above-mentioned two methods. However, the amount of matrix computation performed by the ANN model used in this study can be implemented in real-time.

Conclusions
The present study proposed a method for using the GRF data for state classification, while also reducing the errors caused by shuffling. An appropriate input factor was selected for state classification, and this factor was applied to the threshold method and machine learning-based method to examine the state classification accuracy.
Consequently, COP w , the waveform length derived from the sum of all .
COP within an arbitrary time window, was selected as the state classification factor. The threshold method using COP w showed the mean classification accuracy of ≥95% in state classification experiments on the healthy adult and patient groups. This method was found to show significant improvement in the state classification error caused by shuffling, especially in the experiments on the patient group. However, because the data from the previous step were used in the computation to obtain COP w , a classification delay was also detected. Moreover, changes in the COP that appear in the normal standing state may influence COP w , which can lead to classification error.
However, the ANN model that used COP w as the factor showed excellent state classification accuracy of ≥98% in both the healthy adult and patient groups, while also showing no classification delay, which was observed in the threshold method using COP w .
In conclusion, it was determined that the selection of COP w as the factor for state classification was an appropriate choice. Moreover, the ANN model using COP w cannot only fundamentally resolve the problem of state classification error caused by shuffling, but is also capable of real-time state classification. Furthermore, the GRF measurement device used in the present study was fabricated as an insole type that can be inserted into a shoe. Thus, it can be worn conveniently and operated for a long time, which enhances its applicability to actual clinical trials.
In future studies, the authors aim to develop a classification method with reduced state classification errors caused by differences in the gait characteristics between healthy adults and patients; change in direction of walking or turning during walking, and differences in the walking speed will be examined, so that the proposed method can be adopted in actual clinical experiments.  Informed Consent Statement: Informed consent was obtained from all subjects involved in the study.

Data Availability Statement:
The data presented in this study are available on request from the corresponding author. The data are not publicly available due to ethical concerns since they were obtained in a clinical trial.

Conflicts of Interest:
The authors declare no conflict of interest.

Appendix A
As illustrated in Figure A1a, the GRF measuring insole device developed in the present study comprised a total of 10 FSRs (FSR-402, Interlink Electronics, USA), of which five were attached to the bottom of the insole for each foot. The locations of the FSR attachment were as illustrated in Figure A1c, and as presented in Table A1. The locations were standardized to use the height of each participant [22]. The distance between the center points of both heels, depicted in Figure A1c, was assumed to be equivalent to the shoulder width.
The schematic of the gait analysis system is illustrated in Figure A1b. First, the GRF data collected from the left insole were transmitted to the right insole via a Bluetooth device; these data were subsequently combined with right foot GRF data and transmitted to a PC wirelessly by Bluetooth for use in the analysis.
were standardized to use the height of each participant [22]. The distance between the center points of both heels, depicted in Figure A1c, was assumed to be equivalent to the shoulder width.
The schematic of the gait analysis system is illustrated in Figure A1b. First, the GRF data collected from the left insole were transmitted to the right insole via a Bluetooth device; these data were subsequently combined with right foot GRF data and transmitted to a PC wirelessly by Bluetooth for use in the analysis.

Appendix B
In this study, the phase randomized Fourier surrogate method was used to determine whether . COP was deterministic. In this method, the . COP data is Fourier transformed, multiplied by a randomly assigned phase term, and then inverse Fourier transformed to obtain surrogate data [30,31]. ApEn was calculated for each of the original . COP data and surrogate data, and if there was a difference between these two ApEn values, the original . COP data was interpreted as a deterministic signal rather than a linear noise. The ApEn values calculated from the . COP data of the healthy adult and patient groups obtained in this study are shown in Figure A2. It can be seen that both groups have different ApEn values obtained from original . COP data and surrogate data, and these results indicate that the . COP data obtained in this study is a deterministic signal. data was interpreted as a deterministic signal rather than a linear noise. The ApEn values calculated from the data of the healthy adult and patient groups obtained in this study are shown in Figure A2. It can be seen that both groups have different ApEn values obtained from original data and surrogate data, and these results indicate that the data obtained in this study is a deterministic signal.