Wearable EMG Sensor for Gait Rehabilitation using IoT

Interventions for movement dysfunction, including radiography and rhythmic planning, have demonstrated a signi(cid:976)icant increase in gait mechanics. While the optimum criteria for gait training are still to be determined, previous research shown that the training duration facilitates neural restructuring, thereby promoting the design of wearable technology for gait recovery. This work provides evidence of the advanced tool used to acquire muscle activity. Muscle activity is recorded and analyzed on Node micro controller unit, then sent to remote service using internet of things concepts, where message queuing telemetry transport protocol is used in the cloud based telemetry of the received signals and is given to the thing speak. The live recordings, along with the frequency variation of the gait in moving and stable condition, are also obtained on the central monitor using the MATLAB. By creating a device that can be used at home, patients would be able to practice and sustain longer recovery services on a regular basis, thus encouraging neural reorganization. This can also help us to monitor patient treatment progress even if the phys-iotherapist is not able to come and recorded data can be sent directly to them.

A Interventions for movement dysfunction, including radiography and rhythmic planning, have demonstrated a signi icant increase in gait mechanics. While the optimum criteria for gait training are still to be determined, previous research shown that the training duration facilitates neural restructuring, thereby promoting the design of wearable technology for gait recovery. This work provides evidence of the advanced tool used to acquire muscle activity. Muscle activity is recorded and analyzed on Node micro controller unit, then sent to remote service using internet of things concepts, where message queuing telemetry transport protocol is used in the cloud based telemetry of the received signals and is given to the thing speak. The live recordings, along with the frequency variation of the gait in moving and stable condition, are also obtained on the central monitor using the MATLAB. By creating a device that can be used at home, patients would be able to practice and sustain longer recovery services on a regular basis, thus encouraging neural reorganization. This can also help us to monitor patient treatment progress even if the physiotherapist is not able to come and recorded data can be sent directly to them.

INTRODUCTION
Electromyogram is an examination that is utilized to monitor the electrical function of muscles. Electromyography is an electro imaging medical procedure used to assess and monitor the electrical function of skeletal muscles. Associate medical system tests the electromotive force reproduced by muscle cells once these neurons are neurologically stimulated and may also be analyzed for physiological abnormalities. The results of electromyogram will facilitate your doctor to con irm the underlying reason. Potential causes might include muscle disorders like a genetic abnormality. Disorders that hinder the motor neuron's ability to transmit electrical impulses to the muscle, for example, myasthenia. Peripheral neurological complications such as tennis elbow, nerve ailments and amyotrophic lateral sclerosis (ALS) affect the nerves outside the neurological system (Rainoldi et al., 2004;Simon, 2004). During testing, one or two thin needles, often called electrodes, are injected through the tissue into the muscle. The electrical impulses detected by the electrodes are then re lected on an oscilloscope. An audio-ampli ier is used and the movement is observed. EMG records the muscle's electrical function during rest periods, mild and intense contraction. Upon placement of an electrode, the patient may be asked to contract the muscle, for example, by raising or lowering the knee. The motion potential, i.e. waveform size and shape on the oscilloscope provides details about the capacity of the muscle to respond while activating the nerves. If the muscle contracts more stif ly, there is an activation of more and more muscle ibers, thereby increasing the potential for action. A related therapy that can be done is nerve conduction analysis. It is a measure of the quantity and strength of electric impulses along with a muscle. This will assess nerve injury and degradation, mostly in conjunction with EMG. All strategies help diagnose the nature, position, and extent of diseases that affect the nerves and muscles (Plewa et al., 2017). Mazzetta et al. (2019) presented work on an enhanced study of body movements freezing in Multiple sclerosis employing electromyography and linear motion inputs of wearable gait sensor system analysis in patients. The purpose of this study is to recognize body movements freezing occurrences, to distinguish the syndrome, and to analyze muscle function within and throughout body movements freezing, to obtain a broader understanding of the condition's pathophysiology, and to determine the probability that the body movements freezing subtype will decay.

Related works
Wei-Chun et al. (2019) described the smart, automated sensors for muscular movement patterns among post-stroke people during the sit-to-stand activity evaluation. The majority of experiments, however, employed embedded sensors with a small number of positions. To use the new enhanced smart device of 16 electrodes, the present work was to establish patterns of muscle spasms in the poststroke people with 8 major movements on the torso and dorsal joints during sit-to-stand activity, where feasible. Tao et al. (2012) developed a motion analysis incorporating automated sensors oriented with motion kinematics, motion kinetics, EMG and muscle strength. This research is very useful for different people, including sports, recovery, clinical diagnosis and health monitoring. Luca et al. (2010) focused on iltering the surface of the EMG signals. The present design is exceedingly immune to many of the disturbances, and not to baseline vibration and artifact vibration. Such types of noise provide a dynamic range which corrodes the part of the electromagnetic spectrum with low frequency. The intention of this work was to examine the impact of manual disturbances and distortion frequently found during SEMG recordings in diagnostic and related activities. Wege and Zimmermann (2007) presented work on sensor based electromyography function. This work presents a hand exoskeleton electromyography function. The system was designed with a focus on recovery process support after hand injuries or strokes. In the architecture, force sensors are incorporated to calculate force transmitted between humans and exoskeletons. It helps the patient to track hand exoskeleton motions that are helpful to instruct novel patterns, muscle conditioning, or medical reasons. Freed (2011) performed a scienti ic body movement's research study on portable EMG regeneration surface electromyography. This method uses an array of the electrode, integrated into a protective shell that is simpler and safer to deploy than conventional system electrodes. A compatible couple of electrodes are selected from the array, minimizing time period and eventual cost. Brunner and Romkes (2008) proposed studies on irregular activation of the EMG muscle among individuals with no brain disorders during gait. The whole analysis has identi ied sporadic muscle movement of individuals who had no orthopedic clinical care. 39 people with such a variety of orthopedic disabilities underwent gait examination, demonstrating with their hands a functional range of movement, manual regulation of muscle power and surface electromyography.

MATERIALS AND METHODS
The proposed systems main aim is to assist with gait therapy and to monitor patients via physiotherapy. This device helps to identify and distinguish between the patients in their stable or moving condition with the help of frequency variations. Since telemetry technology is been applied in this system, the progress of the patient can be monitored even if the doctor is not available. This section includes a detailed description of the block diagram Figure 1 of monitoring and analysis system for movement disorder therapy. Initially, the signals from the muscle are collected using the surface electrodes and EMG sensor. Then the signal goes to Node MCQ, which belongs to an Arduino family which helps in monitoring and analysis. The live recording goes to the computer for viewing in the form of graphs and these graphs are obtained with the programming of Python. The output signal is further processed using MQTT proto-col which is then stored in the cloud for telemetry and graphs can be obtained using thing speak. For the signal, a certain value limit is set so if the signal potential crosses the limit, the alert will be given by the buzzer.

Surface Electrodes
The electrode comprise of a basic surface detecting silver-silver chloride, which detects a current on the surface via the passive form skin-electrode interaction. Surface electrodes that are utilized in EMG monitoring may be either active or passive. A preampli ier will either be positioned within the electrode and closer to the active form of EMG data gathering. The bene its regarding surface electrodes are there will be limited application discomfort because they are more replicable, they are simple to incorporate and they are suitable for movement implementations.
Using passive electrodes, the signal connectors are utilized to transmit the EMG signal from the skin surface electrode to the EMG device and are carefully shielded to minimize the risk in the EMG signal that causes movement artifacts (Laferriere et al., 2011). In the baseline of the EMG signal, movement artifact occurs as quite lower frequency deviations which may in instances dominate the EMG signal. Passive electrodes depend on cords for the transmission of the relatively low level electromyogram input to the ampli ier. Because the EMG pulse is stored on the surface of the skin, it has relatively high amplitude. Hence it is important to reduce the resistance of the skin as often as needed, this can include the use of gels (Garcia et al., 2007).

EMG Sensor
Electromyography (EMG) is a medical treatment procedure utilized to assess and monitor the electrical impulses of skeletal muscles. Electromyography is conducted by a diagnostic tool called electromyography that generates a report referred to as electromyogram (Hermens et al., 2000). The feature of MyoWare muscle sensing will help you to create this output. This type of sensor is utilized to monitor muscular electrical impulses. It then transforms the impulses into a dynamic voltage accessed on any circuit board's analog input pin. The EMG signal is a neurological signal re lecting neuromuscular activities that calculate the electrical currents developed in the muscles throughout their movement. The sensor tracks the muscles function based on the contraction/relaxation that occurred in the muscular area. This is supported by scienti ic evidence that an electrical stimulation explodes once a muscle contract and spreads through the underlying tissue, bone and can be detected from surrounding regions of the skin. Since EMG response is estimated in microvolts, it is monotonically correlated with the amount of muscle contraction, or otherwise, the higher the muscle contraction and hence the greater the extent of muscles stimulated and the greater the voltage registered. An EMG lasts between 30 and 60 minutes to complete (Evetovich et al., 2007).

NODE MCU-ESP8266
The ESP8266 is a micro controller that acts as a Node MCU in this work. It is an auto contained Wi-Fi frame work that functions from the original micro controller as a link to Wi-Fi and is also suf icient to run activities involving itself. This unit uses a standard in USB interface (Hove et al., 2012).

Buzzer
The buzzer consists of a two-pin exterior case to connect to the power and ground. Arduino's buzzer will run at 5V, 9V, 12V or any other voltage. When the EMG signal varies, the current is transferred to the buzzer which triggers the ceramic disk to contract or expand. Altering this then induces the vibration of the outer disc. In this way, the sound alert is heard and thus con irms the improved movement in the leg (Miyake, 2009;Kumru et al., 2016).

Simulation Tool
MATLAB is a programming language developed by Math Works. MATLAB has been used in this work to process the EMG signal and perform the veri ication process. MATLAB tool has been used for processing all these techniques, the method followed by (Krasula et al., 2011). Thing Speak platform is an Internet of Things information platform and software programming application which allows us to acquire, preserve, analyze, observe and operate from sensor details. Thing Speak is a downloadable resource which always enables you to gather and evaluate computer information in the cloud and digitally build applications. The Thing Speak provides software that enable to analyze and interpret the results in MATLAB and respond to the indings. The parameters like temperature, humidity and pressure are detected by the sensors and share that data in terms of a numerical value or electrical signal. This output data or input is given to a different system or to guide a method (Heim et al., 2009).

RESULTS AND DISCUSSION
The system has been analyzed and the output is evaluated. The hardware and positioning of electrodes are shown in Figure 2. If the output signal of the EMG is obtained, the data indicate the muscle condition. Timing (on/off) details are the key information to be collected. This timing details can be interpreted straight from the actual EMG input for some cases of movement observation. The raw signal is iltered with a high pass or low pass ilters. Nevertheless, there are other unique methods that are performed using myogram signals (Madeleine et al., 2006). The most prominent involves full wave recti ication which is a complete maximum signal value, half wave recti ication that removes all negative signal elements, a linear envelope which is a modi ied maximum wave signal, root mean square that will generally square the input, consider its average of a timing deciding factor interval between 100-200 ms, after which add the square root and inally developed myogram in which region below the adjusted scale can be calculated for the complete operation of prescribed time or magnitude values.
The result of the proposed system can be mainly classi ied as two cases: 1. Normal EMG signals that are been produced by the EMG sensors.
2. The abnormal signals which are been created when the muscles are less active or no activity is been taking place.
The normal EMG signals are usually in the form of "M" shaped graphs and the normal output signal generated in the Think speak displayed in Figure 3. Figure 4 is the graph that is been produced when there is no muscle activity. In this case the input value which is been given as output is an open loop system and there are no variations that are been sensed by the sensors. Figure 5 shows a slight improvement in the signals where a small amount of variations can be analyzed.

Figure 5: EMG signal with less muscle activity.
The frequency variation of the gait can be also observed when the patient's leg is in moving or stable condition. The normal EMG signals obtained in the analysis of MATLAB is shown in Figure 6. The frequency variation of the gait is obtained using discrete wavelet transform and wave forms are classi ied as high frequency and low frequency signal. By observing the variations in low frequency signal, it is determined whether the person is in moving or stable condition for a certain time period. The Figures 7 and 8 illustrate the difference between the frequency variation when the person is in stable state and frequency variation when person is in moving state. The proposed system adds more value and importance than the previous methods. (Mercer et al., 2006) reported the difference in various positions of muscles on hands such lexion and extension by keeping sensors at various positions. Irregular muscle function is usually related to the underlying condition in patients with a speci ic neurological disorder. This research work found irregular muscle movement in orthopedic people who were not involved in the neurology. 39 patients with a range of orthopedic problems undergone gait examination, involving assessment of the functional range of movement in the legs, manual monitoring of muscle strength, instrumented gait investigation, and surface evoked potentials.

Figure 7: Frequency variation when person is in stable state.
Muscle fatigue is the primary source of abnormal behavior with EMG. While irregular muscle activity did not correlate to the weak muscle regulated by the joint (Brunner and Romkes, 2008). (Freed, 2011) proposed a novel portable electromyography observation technique referred to as the Wearable EMG analysis rehabilitation method for gait study. Acquisition of modern EMG is dependent on structural measures using pairs of individual electrodes located underneath the muscle of concern.

Figure 8: Frequency variation when person is in moving state.
This review of gait analysis is bene icial for patients with musculoskeletal disorders like muscular dystrophy, down syndrome and multiple sclerosis. This can also be used for people who are elderly and check their muscle condition. The main advantage of the present proposed work over these existing works is that the application of IoT is used as the telemetry system which helps the people to access the report from any part of the world with the help of internet. Since surface electrodes are used, the proposed method is a painless technique and this helps us in the live and continuous monitoring of the patient for the diagnostic purpose.

CONCLUSIONS
Developments in wearable sensors and wireless technologies have identi ied a very signi icant impact on the monitoring system for health care.
The key bene its of wearable sensors are that they are small, lightweight and are power consuming and have wireless communication module. Doctors may not be available for patient check-up daily visits, hence using a telemetry system enables this mechanism where patient reports can be easily accessed and treatment can be provided based on the reports. Portable sensor systems can transcend the limitations of traditional measurement devices, allowing long-term data recording to be done in clinical and home environments or in other settings. These are focused on a low cost noninvasive approach and contribute to tracking the movements and daily activities of patients, treating and preventing neuro musculoskeletal diseases and increasing freedom of movement, nevertheless, they are also used to track the patients training routines and outcomes.