A Fuzzy Controller for Lower Limb Exoskeletons during Sit-to-Stand and Stand-to-Sit Movement Using Wearable Sensors

Human motion is a daily and rhythmic activity. The exoskeleton concept is a very positive scientific approach for human rehabilitation in case of lower limb impairment. Although the exoskeleton shows potential, it is not yet applied extensively in clinical rehabilitation. In this research, a fuzzy based control algorithm is proposed for lower limb exoskeletons during sit-to-stand and stand-to-sit movements. Surface electromyograms (EMGs) are acquired from the vastus lateralis muscle using a wearable EMG sensor. The resultant acceleration angle along the z-axis is determined from a kinematics sensor. Twenty volunteers were chosen to perform the experiments. The whole experiment was accomplished in two phases. In the first phase, acceleration angles and EMG data were acquired from the volunteers during both sit-to-stand and stand-to-sit motions. During sit-to-stand movements, the average acceleration angle at activation was 11° – 48° and the EMG varied from −0.19 mV to +0.19 mV. On the other hand, during stand-to-sit movements, the average acceleration angle was found to be 57.5°–108° at the activation point and the EMG varied from −0.32 mV to +0.32 mV. In the second phase, a fuzzy controller was designed from the experimental data. The controller was tested and validated with both offline and real time data using LabVIEW.

paper, a fuzzy controller for sit-to-stand and stand-to-sit movements is proposed. Wearable EMG and kinematic sensors are used to accomplish the experiment. An algorithm is developed for data acquisition and filtering of raw EMG signals as well as accelerometer data. Five randomly selected subjects were used to validate the controller employing real time data. The results support the hypothesis which expresses that the developed controller can detect human motion and drive the motor in a necessary direction. Section 2 describes the experimental methodology along with the acceleration angle measurement, EMG signal processing, and a short discussion of the experiments. Section 3 includes a brief description of the design of a fuzzy controller. The results are presented and discussed in Section 4. Finally, conclusions have been drawn by combining all of the important points of the study.

Experimental Methodology
The study has been completed in two phases. In the first phase, acceleration angle and EMG data are collected from the selected subjects. The acceleration angle measurement technique and the EMG data processing are described in this section. In the second phase, a fuzzy controller is designed and validated with the data acquired in the first phase. Figure 1 illustrates the block diagram of whole process.

Acceleration Angle Measurement
Measuring acceleration angle is the first step to detect the human movement intentions through muscle activation. Three components of acceleration are shown in Figure 2. The direction cosines [28] of the resultant acceleration along three axes are calculated from following equations: where, A x , A y and A z are the three components of resultant acceleration along x, y and z axes. θ x , θ y and θ z are the angle between resultant acceleration and the component A x , A y and A z respectively. An accelerometer is a device which measures the acceleration generated because of gravitational and inertial forces as well as profoundly applied in gait analysis [29][30][31]. A kinematics sensor (Shimmer Technology, Dublin, Ireland) integrated with an accelerometer was used to measure the acceleration. The sensor is 53 mm × 32 mm × 19 mm in dimension and weighs 27 g. The coordinate system of the sensor is illustrated in Figure 3.  [32].
The sensor was attached on the thigh so that it could be placed on the xy-plane. When the person intends to move, i.e., the movement between sit to stand or stand to sit, it was rotated around the y-axis. Figure 4a shows the angle calculated from the direction cosines of the resultant acceleration during sit to stand and Figure 4b shows the same during stand to sit along the x, y and z axes with respect to time. The acceleration angle along the x axis was decreasing with time whereas the angle along the z axis was increasing during sit to stand. On the contrary, during the stand to sit movement the acceleration angle along the x axis was increasing and the angle along the z axis was decreasing with respect to time. The acceleration angle along the y-axis remained the same in both cases.

EMG Signal Processing
EMG is a technique which involves recording and analyzing the electrical activities of muscles at rest and throughout contraction. A wearable EMG sensor (Shimmer Technology) was used to ascertain the muscle activity. The dimensions of the sensor are 53 mm × 32 mm × 23 mm, its weight is 32 g and it is connected to a positive, negative and neutral electrode.
Naturally raw EMG signals are random in shape due to the constant changes of the actual sets of recruited motor units. EMG signals can be affected by many other issues, e.g., different thickness of tissues, noisy electrical environments, lower grade electrodes, etc. that can add noise, but the EMG signal contains very important information about muscle innervations. The noise frequencies that contaminate raw EMG have to be properly filtered out. To remove noise, a Butterworth third order low pass filter was used in this experiment. The cutoff frequency was set at 25 Hz. Figure 5a illustrates the raw EMG signal and Figure 5b shows the filtered signal.

Experiments
In order to identify the lower limb muscle activation with the change of acceleration angle along the z axis, twenty volunteers (age 23-30, all male) were picked randomly from a pool of candidates. Participants were asked to complete an informed consent form before the experiment. The consent form included their age, gender, diseases or disabilities, etc. Subjects that suffered from any previous neuromuscular injury were excluded from the experiments.
For the purpose of detection of movement intention, the muscle named vastus lateralis was selected as the EMG source. The surface of the muscle was cleaned with sanitizer to remove any inhibitory particles and the hair was shaved to get the best readings. One EMG sensor was placed and bound on the thigh and positive and negative electrodes were positioned on the vastus lateralis. The neutral electrode was set at the knee. One kinematics sensor was put on the same thigh so it could rotate around the y-axis during sit to stand and stand to sit movements. The positioning of the sensors and electrodes is shown in Figure 6. The experiments were performed like people's everyday movement when standing up from a chair or sitting down on a chair. Two legs were placed parallel and subjects were asked to get up without holding anything in their arms. They were also encouraged to put same weight in their two feet during the experiments. Volunteers were apprised to perform sit to stand and stand to sit movements as naturally as possible to have to the best results. All movements were performed on the same chair (height 40 cm).
Furthermore, data acquisition was performed using LabVIEW (National Instruments, Austin, TX, USA). Only the accelerometer data was extracted from the kinematics sensor over the accelerometer range ±1.5 g. The EMG and the accelerometer data was taken at a 51.2 Hz sampling rate. Figure 7 illustrates the EMG signal during sit-to-stand movement with respect to the resultant acceleration angle along the z axis (θ z ) for all participants. Similarly the EMG signal throughout the stand-to-sit movements with the change of the same acceleration angle (θ z ) is depicted in Figure 8. The Graphs were plotted by LabVIEW as well. The findings from the experiments are described in Table 1.     When the subjects intended to stand up or sit down, the range of immediate acceleration angles were selected based on the maximum EMG values. The maximum EMG values in those ranges are presented in Table 1. During sit-to-stand the acceleration angle varied from 11° to 48° and the maximum EMG values were ±0.19 mV, but in the stand-to-sit movement the acceleration angle varied from 57.5° to 108° and maximum EMG was found to be ±0.32 mV. This data was considered when designing the fuzzy controller which is explained in the following section.

Designing a Fuzzy Controller
A fuzzy controller is an intelligent control system due to having ability of tolerance in membership degree ranging between 0 to 1 where as traditional Boolean logic is either 0 or 1. Fuzzy control was originally proposed by Mamdani and Baaklini [33] and was originally conceptualized by Zadeh in 1965. Being an easy method to express the ambiguous terms of daily life, the fuzzy controller quickly became popular. Eventually a large number of interesting applications have been proposed, e.g., in energy storage [34], in renewable energy [35], in sustainable manufacturing assessment [36], in vehicle control [37][38][39], in medical science [40], and even in the education sector [41][42][43][44]. EMG data is very unpredictable and contains a lot of fuzziness. Therefore, the fuzzy controller is an ideal approach for developing an EMG-based exoskeleton control system.

Defining Linguistic Variables and Membership Function
The proposed controller consisted of two input linguistic variables: EMG signal and acceleration angle and one output linguistic variable: motor status. The linguistic variable EMG signal included the linguistic terms negative high, low and positive high. The other linguistic variable input, the acceleration angle, comprises two linguistic terms named low and high. The output linguistic variable, i.e., motor status, contains anti-clockwise rotation, no rotation and clockwise rotation linguistic terms. The membership functions of those variables were defined from the data that are given in Table 1. The graphical representation of all membership functions is shown in Figure 9.

Defining Fuzzy Rule Base
Fuzzy rules express the relationship between input and output linguistic variables in terms of linguistic terms. The antecedent part, i.e., the If portion and the consequent part, i.e., the Then portion have to be specified as well as the contradictory rules should be avoided due to achieve consistent rule base. If P 1, P 2, P 3 ….. P N are the linguistic terms of input variables, the total possible rules N can be written as: Therefore, six rules (3 × 2) can be applied in the proposed controller. The rule base in a matrix form is shown in Table 2.

Defuzzification
Defuzzification is a technique that converts the degree of membership of the output variables into a crisp value within their linguistic terms. Several mathematical methods are proposed for defuzzification, such as, center of area (CoA), modified center of area (mCoA), center of sums (CoS), center of maximum (CoM), mean of maximum (MoM) etc. To defuzzify the output variable of the proposed fuzzy controller, the modified center of area (mCoA) method was used. This method considers the full area under the scaled membership functions and calculates the geometric center of that area using the following equation:

Testing the Controller
The above mentioned fuzzy system was designed in LabVIEW. To validate the rule base, a "Test System" page was used. The input values for two inputs were put randomly and found the appropriate invoked rules. Hence, the system worked deservedly. An example of this test is depicted in Figure 10. Figure 10. Offline data testing through "Test System", when "EMG Signal" value is −0.107 and "Acceleration Angle" is 80°, Motor Status is Clockwise Rotation.

Results and Discussion
The analysis of the EMG signals aimed to investigate how the degree of membership for the controller could be defined. Secondly, after devising the controller, it was important to test the controller with real time data to assess its effectiveness. To corroborate the developed fuzzy controller, five subjects were selected (male gender, height 162, 165, 171, 168 and 169.5 cm and weight 69, 66, 72, 67.5 and 70 kg, respectively). They were asked to perform the same experiment described in Section 2.3. Sensors were placed in the same manner on the same muscle while the same precautions were taken. Figure 11 shows the controller output during sit to stand and Figure 12 illustrates the throughput of the controller during the stand to sit movement of Subject 1. The acceleration angle, EMG value, controller output and the status of motor rotation those were captured during real time tests of five subjects are given at Table 3. In Table 3 the instantaneous values of EMG and acceleration angle as well as their corresponding controller output and motor status during sit-to-stand and stand-to-sit movements of the five randomly selected subjects when the controller is tested in real time are presented.
For Subject 1, during sit-to-stand movement the EMG magnitude is 0.0272 mV and the acceleration angle is 22.53° for an instant which generates a controller output of 0.00048 and causes no motor rotation. This motor status means the subject is still at sitting down condition.     On the contrary, when the subject intends to stand up, the EMG magnitude increased to 0.254 mV and the acceleration angle became 33.23°, which produces a controller output of −0.50023 and changed the motor rotation to "Anticlockwise Rotation". Likewise for the same subject during stand-to-sit movement, the EMG magnitude and acceleration angle for an instant are 0.0483 mV and 88.88°, respectively, which make controller output 0.00000 and motor status remains at "No Rotation". This status indicates that the subject is standing up. When the subject intends to sit down the EMG magnitudes and acceleration angle change simultaneously to −0.121 mV and 65.42°, respectively.
These changes reset the controller output to 0.49990 and the motor status to "Clockwise Rotation". Similar patterns are found for the other subjects as well.
The experimental results show that the designed controller performed properly for the five subjects, thus the proposed controller is capable of detecting the human intention through surface EMG signals. By employing the relation between EMG and acceleration angle it can control the motor direction as required. EMG-based controllers for the upper or lower limb exoskeletons have been widely investigated for the last few decades. Each researcher has come up with his or her own intelligent control system, e.g., fuzzy, ANN, neuro-fuzzy controller, etc. This study emphasized the fuzzy controller for a sit to stand and stand to sit movement. Yin et al. [7] proposed another human machine interface (HMI) neuro-fuzzy controller for lower limbs. They established an extended physiological proprioception (EPP) feedback system for lower limb exoskeletons, but it was not validated for sitting and standing movements.
On the contrary, Christian and Günter [19] evaluated their developed exoskeleton for sit-to-stand movements, but the control algorithm was based on torque control which was estimated from the EMG signals. Another important feature was the use of six channels to acquire EMG signals whereas the proposed fuzzy controller uses only one channel, hence a much simplified controller is developed in this research.

Conclusions
In this paper, a fuzzy controller for lower limb exoskeletons has been presented. In order to ensure the simplicity of the hardware, wearable sensors were used. The EMG data acquisition is completed through a single channel which makes the controller handier. In the first phase of the experiment acceleration angles and EMG data were collected from twenty volunteers. The acceleration angles varied from 11° to 48° during sit-to-stand movements and the maximum EMG is ±0.19 mV whereas during stand-to-sit movements the acceleration angle varied from 57.5° to 108° and the maximum EMG is found to be ±0.32 mV. Using this data, the fuzzy controller is proposed and tested with offline data.
The developed fuzzy controller is also tested using real time data. Five randomly selected subjects were used in the test and the experimental results show the power of the controller. The controller output for sit-to-stand from the real subjects falls within the range of either 11° to 48° acceleration angles or EMG values ±0.19 mV. In the same way during stand-to-sit movement the controller output for the same subjects falls within the range of either a 57.5° to 108° acceleration angle or EMG values ±0.32 mV. This study can be considered as the initial part of building a prototype exoskeleton for lower limb impairment.
In order to have a precise and stable control, some other EMG signal processing technique, e.g., root mean square (RMS), moving average (MAV), or wavelet analysis, etc. need to be introduced. Future work will aim to develop the controller to increase the degree of freedom (dof) range of human movement as well as to be compatible with robust application.

Conflicts of Interest
The authors declare no conflict of interest.