Fall Prevention Midterm Report. Akram Alsamarae Lindsay Petku 03/09/2014 Dr. Mansoor Nasir

Similar documents
siot-shoe: A Smart IoT-shoe for Gait Assistance (Miami University)

How Do You Swing? You should be working with new lab partners starting with this lab.

Stride Time Calculation from EMG and Foot Switch Data and Finding Corelation between Them for Prosthetic Control

Treadmill and daily life

In addition to reading this assignment, also read Appendices A and B.

Datalogging Shirt for Baseball Pitchers

TRAINING WITH! PHYSICLO RESISTANCE GEAR. Testing & Validation

Towards determining absolute velocity of freestyle swimming using 3-axis accelerometers

SHUFFLE TURN OF HUMANOID ROBOT SIMULATION BASED ON EMG MEASUREMENT

Smart-Walk: An Intelligent Physiological Monitoring System for Smart Families

Neuromuscular Reflexes

Centre for Transport Studies

Ranger Walking Initiation Stephanie Schneider 5/15/2012 Final Report for Cornell Ranger Research

Transformation of nonfunctional spinal circuits into functional states after the loss of brain input

Second Generation Bicycle Charging Station. Engineering Analysis

Line Following with RobotC Page 1

A CO 2 Waveform Simulator For Evaluation and Testing of Respiratory Gas Analyzers

Electromyographic (EMG) Decomposition. Tutorial. Hamid R. Marateb, PhD; Kevin C. McGill, PhD

CS 528 Mobile and Ubiquitous Computing Lecture 7a: Applications of Activity Recognition + Machine Learning for Ubiquitous Computing.

Using Accelerometry: Methods Employed in NHANES

DEVELOPMENT OF REAL-TIME EMG SONIFICATION SYSTEM FOR GAIT

WALKING MOTION ANALYSIS USING SMALL ACCELERATION SENSORS

Does Ski Width Influence Muscle Action in an Elite Skier? A Case Study. Montana State University Movement Science Laboratory Bozeman, MT 59717

Open Research Online The Open University s repository of research publications and other research outputs

Electromyography Study on Lower Limb Muscle Synchronizations Strategies during Walking and Sitto-Stand Tasks on High-Heeled Shoes

D-Case Modeling Guide for Target System

Standing Waves in a String

Supplementary Figure S1

14A. Neuromuscular Reflexes. Experiment

2600T Series Pressure Transmitters Plugged Impulse Line Detection Diagnostic. Pressure Measurement Engineered solutions for all applications

A Novel Approach to Predicting the Results of NBA Matches

ME 8843-Advanced Mechatronics. Project Proposal-Automatic Bike Transmission

BLOOD PRESSURE SENSOR BT17i USER S GUIDE

RM-80 respiration monitor

Overview. 2 Module 13: Advanced Data Processing

Mobility Lab provides sensitive, valid and reliable outcome measures.

SmartMan Code User Manual Section 5.0 Results

Use of On-Body Sensors to Support Elite Sprint Coaching

Bicycle Safety Map System Based on Smartphone Aided Sensor Network

A Pilot Study on Electromyographic Analysis of Single and Double Revolution Jumps in Figure Skating

FIG: 27.1 Tool String

Ball Toss. Vernier Motion Detector

A Conceptual Approach for Using the UCF Driving Simulator as a Test Bed for High Risk Locations

Gait Analysis by High School Students

Statistics of Bicycle Rider Motion

Application Note AN-107

User Activity Related Data Sets for Context Recognition

Standard 3.1 The student will plan and conduct investigations in which

Lab 1. Adiabatic and reversible compression of a gas

b

Detecting change in behaviour in walking, using the accelerometer of a smartphone

Opleiding Informatica

QUICK WARM UP: Thursday 3/9

Gait Analysis System. User Manual and Outcome parameters Patent WO2012/ A1

Goodyear Safety Research Project 2008 Presentation by Competitive Measure at the FEI Eventing Safety Forum. Presented by Tim Deans and Martin Herbert

Accelerometers: An Underutilized Resource in Sports Monitoring

The three steps for biomechanical assessment are the following: > Periodically verify the results and the efficacy of treatment

BME 4202 Projects II Midterm Report. Project Therma-STAT! Team Temp Watch. Dana Novak, Sarah Hill. Lawrence Technological University

Exploring the relationship between the pressure of the ball and coefficient of restitution.

Video Based Accurate Step Counting for Treadmills

STATE OF NEW YORK PUBLIC SERVICE COMMISSION. At a session of the Public Service Commission held in the City of Albany on August 20, 2003

Improving the Bus Network through Traffic Signalling. Henry Axon Transport for London

Boyle s Law: Pressure-Volume Relationship in Gases. PRELAB QUESTIONS (Answer on your own notebook paper)

DIAGNOSTICS OF IMPULSE LINE BLOCKAGE WITH A MULTI-SENSING DIFFERENTIAL PRESSURE TRANSMITTER AT THE AIR LINE

The effects of a suspended-load backpack on gait

DIFFERENCE BETWEEN TAEKWONDO ROUNDHOUSE KICK EXECUTED BY THE FRONT AND BACK LEG - A BIOMECHANICAL STUDY

b

Mutual and asynchronous anticipation and action in sports as globally competitive

Lab 4: Root Locus Based Control Design

Walking with coffee: when and why coffee spills

5.1. Data Displays Batter Up. My Notes ACTIVITY

IEEE RAS Micro/Nano Robotics & Automation (MNRA) Technical Committee Mobile Microrobotics Challenge 2016

Gait Analyser. Description of Walking Performance

CHAPTER 3 POSTURAL THREAT

The Criticality of Cooling

Analysis of Traditional Yaw Measurements

(Lab Interface BLM) Acceleration

Analysis of Highland Lakes Inflows Using Process Behavior Charts Dr. William McNeese, Ph.D. Revised: Sept. 4,

Ambulatory monitoring of gait quality with wearable inertial sensors

Boyle s Law: Pressure-Volume Relationship in Gases

LOW PRESSURE EFFUSION OF GASES revised by Igor Bolotin 03/05/12

Questions & Answers About the Operate within Operate within IROLs Standard

iphone as a Physical Activity Measurement Platform

Journal of Emerging Trends in Computing and Information Sciences

Jogging and Walking Analysis Using Wearable Sensors *

Center of Mass Acceleration as a Surrogate for Force Production After Spinal Cord Injury Effects of Inclined Treadmill Walking

ROSE-HULMAN INSTITUTE OF TECHNOLOGY Department of Mechanical Engineering. Mini-project 3 Tennis ball launcher

MRI-2: Integrated Simulation and Safety

Was John Adams more consistent his Junior or Senior year of High School Wrestling?

Prediction of Crossing Driveways of a Distracted Pedestrian from Walking Characteristics

Advanced PMA Capabilities for MCM

Users Group Conference 2018

Analysis of Backward Falls Caused by Accelerated Floor Movements Using a Dummy

Using sensory feedback to improve locomotion performance of the salamander robot in different environments

The Biomechanical Specificity of Running Drills to Sprint Performance

Available online at ScienceDirect. Energy Procedia 53 (2014 )

Movement-Type Classification Using Acceleration Sensor

How is SkyTrak different from other launch monitors?

INSTRUMENT INSTRUMENTAL ERROR (of full scale) INSTRUMENTAL RESOLUTION. Tutorial simulation. Tutorial simulation

Protection against Impact with the Ground Using Wearable Airbags

Transcription:

Fall Prevention Midterm Report Akram Alsamarae Lindsay Petku 03/09/2014 Dr. Mansoor Nasir

Updates to timeline Last semester we created a timeline that included important milestones. We have narrowed down locations of sensors based upon data we have acquired and analyzed in MATLAB, as well as based upon literature related to gait analysis. We began with sensors on the lower legs (the gastrocnemius muscle) and the upper leg in the front (rectus femoris), as well as in the back (biceps femoris), and in addition two sensors were placed on either side of the abdomen (rectus abdominis). These are the main muscles in the lower and upper extremities and were chosen to produce the strongest signal. Graphs of the results for these sensors are located in the appix. Based on the reproducibility of the graphs and the amplitude of the signals, or the lack-thereof, we have narrowed down the location of the sensors to the lower leg, and the abdomen. In the next two weeks we will bring people into the lab and run full trials as explained in our completed protocol: the trials we are planning are in the proposal section of this document. Gathering trials from subjects should be completed by the of March. Older adults will be used for the trials, and in order to achieve a large amount of data, some other students have volunteered to be subjects for our trials. Once the trials are completed and the data is analyzed, we will begin to write an algorithm which can assess the risk for falling. Once the algorithm is created we can assess its validity by running a few more trials and inputting the new data into the algorithm. We then will write the final report and create the final presentation. Concurrently, Akram will be taking a lead on writing a paper on our findings to be submitted to IEEE-EMBS (time permitting) or to BMES. Weekly Timeline Week of 3/10 Data gathering with subjects IEEE paper (Time permitting 03/17/14) Week of 3/17 Analysis with Matlab IEEE paper (Due 03/17/14) Week of 3/24 Write algorithm Week of 3/31 Write algorithm BMES paper (Due 04/23/14) Week of 4/07 Write algorithm BMES paper (Due 04/23/14) Write final paper Week of 4/14 BMES paper finalize (Due 4/23/14) Write final paper Prepare poster (Due 4/24/14) Week of 4/21 Poster presentation finalize (Due 4/24/14)

Submit BMES paper (Due 04/23/14 Write Final Paper (Due 05/7/14) Final presentation (05/02/14) Week of 4/28 Finalize paper (Due 05/7/14) Presentation (05/02/14) Explanation for any major changes in project outcomes The main project has remained relatively the same. We are however taking a more research based approach versus a commercial product. Our goal remains that we should have a basic design for what would be included in this system; this includes a program for assessing risks, a way to write this program to a microprocessor, as well as a design for the main components of the system. Our research shall be looking for different patterns in the data we collect, and looking to see if there is an accurate way to assess fall risk. Due to the fact that we are not able to collect fall data, we will need to compare our data to literature based on statistical analysis comparing fallers and non-fallers. Another major aspect of our project has emerged: if our device cannot detect a fall that is inevitable to occur, it may be able to generate reports that a doctor can look at and see how your gait is changing over time. This has always been an important aspect to us, and we shall determine the parameters which can be reported to the doctor or care provider. This aspect may be able to prevent a fall days before it will occur, due to a possible change in your gait days before it actually causes you to fall down. This concept is already being used today; when someone goes to the doctors they might take some kind of data from the patient about their gait. Our approach is different in the fact that this data will be continuously taken, every day, and even slight changes can be seen far in advance. This may seem like overkill, but if this is your LIFE, then this may be just the step we need. Many athletes use devices that can tell them how they are training, our device will be geared toward the elderly. Completed Tasks Create an experimental protocol Lindsay - Subject preparation Akram- DELSYS operation Master DELSYS system Akram Learn MATLAB Uploading file Creating plots

Measuring number of peaks Getting rid of offset in X acceleration data Looking at FFT with signal processing toolbox; investigated some low pass filters-data from accelerometer can be cleaned up nicely with 1-10Hz low pass filters Test system with many sensors Narrow down sensor placement to key areas Lindsay-accelerometer data on lower leg and torso as opposed to using upper leg Akram- EMG on lower leg and torso Revise experimental protocol based on findings Current Tasks Test on many subjects Plan on running a test with many subjects during spring break and afterwards as well Lindsay: in charge of subject preparation and instruction Akram: in charge of running DELSYS and exporting data into a usable file Write paper for IEEE or BMES Fall detection indicators based on EMG/Accelerometer Sensor placement evaluation to determine which sensor site provide a reliable fall risk assessment Continue with literature search for fall data Lindsay: will continue to look at what people have done with accelerometers Akram: will look at EMG Finish writing algorithm to determine fall risk Lindsay: will focus on accelerometer data Matlab Tasks Categorize different steps (small, medium, large, etc.) Calculate moving average/overlay steps to compare Investigate RMS for various individuals at various walking speeds (compare to literature Narrow down which axis is most important Based on any relevant literature, Akram will look at how EMG can be used to assess fall risk Akram will correlate EMG data with Accelerometer data

Accomplishments and tasks done since the start of this semester Since last semester we have made progress on a number of fronts. We have analyzed enough data using sensors at various locations to determine where desired sensors should be placed. We began by placing sensors on the lower leg (gastrocnemius) and compared it to the upper leg (rectus femoris). Studying the results of this trial we found that the lower leg had much better data with regards to reproducibility as compared to the upper leg; this is based on graphs generated in MATLAB which show that the lower leg has a waveform which remains the same in shape as well as amplitude. We further studied placing sensors on the torso and found that we got good signal from both accelerometer and EMG. To ensure consistency in trials, we created a belt that had locations for two sensors on either side of the torso. Another reason to use the sensors at this location is based upon literature; studies have been done relating the root mean square value (RMS) of the torso acceleration to an increased fall risk and we will be assessing the validity of these studies in our own trials. We have also been able to connect the DELSYS sensing system to our laptops which will allow us greater portability. We are no longer tethered to the biomechanics lab and we can take the device to wherever we would like to test. We have gathered a lot of data and we are currently analyzing it using Matlab. With Matlab, we are taking raw data and running scripts to plot and display the data and to determine aspects such as step frequency and RMS. Code for these is contained in the appix. With this data, we are creating an algorithm to highlight when risky gait is detected. Detail for projected tasks / experiments / tests (Planned) The following protocol highlights the study setup that we will be testing on individuals. We plan on doing several trials with various older adults as well as other students who wish to volunteer, in order to gather substantial amounts of data. In order to determine that there is indeed a walking pattern that remains the same for different individuals we will need to gather enough data to prove significant. We will be utilizing the DELSYS sensor system to capture real-time acceleration and EMG data. Two sensors will be attached to a belt and two to the lower legs; participants will be instructed to perform pre-determined tasks. Each participant s demographic data will be taken (ger, age, height, weight) and they will have to perform the following tasks:

1. For trial 1, the subject will be asked to walk normally for 5 minutes. He/she will walk continuously along the pre-measured distances. Note: Each individual may walk a different distance but it is important that the total distance is recorded. 2. For trial 2, the subject will sit for 3 minutes in a chair and then will get up from the chair (in any way comfortable to the subject) and walk for 2 minutes. 3. For trial 3, the subject will be directed to walk up a flight of stairs and then back down a flight of stairs. The process will also be recorded on video, with the individual s consent, to make it easier to correspond to the data being captured by DELSYS. List of items bought and their application We are utilizing a belt brace to secure the DELSYS sensors on the torso. The belt also protects the sensors as well as ensures a similar location for sensor placement from person to person. Due to the fact that we are using DELSYS and MATLAB, both provided by LTU, we did not need to purchase any accelerometers or other electronics. Our goal is to develop an algorithm and determine how it will be implemented into a device, as well as a design for various components of the device. For this reason we will not need to purchase any microprocessors or other components; but we will have a detailed plan of what should be the next step if this device is created. Any awards and updates to business plan (if applicable) We submitted a grant proposal to NCIIA on February. The E-team Program focuses on entrepreneurship with funding, training, coaching and investment. Our proposal titled Gait Buddy described the value proposition, timeline, and other aspects of the project. Meeting minutes / Communication with advisors We have met weekly with Dr. Nasir to discuss progress. We have also been communicating biweekly with Dr. Abdullah to provide updates and input on our progress. We have kept a notebook with notes regarding our progress as well as meeting minutes.

Appix

Treadmill Trial: Graphs of EMG and Acceleration For this trial, we wished to narrow down the location of sensors which we will focus on. We used a treadmill to ensure consistent speed during the trial and we were looking for which sensors show the most reproducible results. Figure 1: Right Gastrocnemius Figure 2: Right Rectus Femoris

Figure 3: Right Semitinosus Figure 4: Left Gastrocnemius

Figure 5: Left Rectus Femoris Figure 6: Left Semitinosus

Figure 7: Right Gastrocnemius Figure 8: Right Rectus Femoris

Figure 9: Right Semitinosus Figure 10: Left Gastrocnemius

Figure 11: Left Rectus Femoris Figure 12: Left Semitinosus

Treadmill Trial: Code %This is for 6 sensors! clear all; close all; % Get file, make sure path name is the folder where the data is stored [FileName PathName] = uigetfile({'*.txt', 'Text data (*.txt)';'*.*', 'All Files (*.*)'}) ; cd ('C:\Users\lpetku\Desktop\Preliminary Sensor Placement') [Time, EMG_S1, x_s1, y_s1, z_s1, EMG_S2, x_s2, y_s2, z_s2, EMG_S3, x_s3, y_s3, z_s3, EMG_S4, x_s4, y_s4, z_s4, EMG_S5, x_s5, y_s5, z_s5, EMG_S6, x_s6, y_s6, z_s6] = textread('trial_tredmill.txt','%f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f','headerlines',1); %Correcting for varying sample rate %Number of data points in accelerometer data numofdataptsa=find((x_s1)==0,1)-1; %Number of data points in EMG data numofdataptse=length(emg_s1); %sample rate sampleratea=numofdataptsa/max(time); sampleratee=numofdataptse/max(time); %Fixing acceleration plot time Time2=linspace(0,max(Time),numOfDataPtsA); %Fixing acceleration variables x_s1a=x_s1(1:numofdataptsa)-mean(x_s1(1:numofdataptsa)); y_s1a=y_s1(1:numofdataptsa); z_s1a=z_s1(1:numofdataptsa); x_s2a=x_s2(1:numofdataptsa)-mean(x_s2(1:numofdataptsa)); y_s2a=y_s2(1:numofdataptsa); z_s2a=z_s2(1:numofdataptsa); x_s3a=x_s3(1:numofdataptsa)-mean(x_s3(1:numofdataptsa)); y_s3a=y_s3(1:numofdataptsa); z_s3a=z_s3(1:numofdataptsa); x_s4a=x_s4(1:numofdataptsa)-mean(x_s4(1:numofdataptsa)); y_s4a=y_s4(1:numofdataptsa); z_s4a=z_s4(1:numofdataptsa); x_s5a=x_s5(1:numofdataptsa)-mean(x_s5(1:numofdataptsa)); y_s5a=y_s5(1:numofdataptsa); z_s5a=z_s5(1:numofdataptsa); x_s6a=x_s6(1:numofdataptsa)-mean(x_s6(1:numofdataptsa)); y_s6a=y_s6(1:numofdataptsa); z_s6a=z_s6(1:numofdataptsa);

%%Show plots of EMG figure plot(time,emg_s1,'b'); xlabel('time(s)'); ylabel('voltage'); title('muscle Activation of Right Gastrocnemius Muscle During Normal Walking'); title('sensor 1'); figure plot(time,emg_s2,'b'); xlabel('time (s)'); ylabel('voltage'); title('sensor 2'); figure plot(time,emg_s3,'b'); xlabel('time (s)'); ylabel('voltage'); title('sensor 3'); figure plot(time,emg_s4,'b'); xlabel('time (s)'); ylabel('voltage'); title('sensor 4'); figure plot(time,emg_s5,'b'); xlabel('time (s)'); ylabel('voltage'); title('sensor 5'); figure plot(time,emg_s6,'b'); xlabel('time (s)'); ylabel('voltage'); title('sensor 6'); %%Plot acceleration figure plot(time2,x_s1a,'k',time2,y_s1a,'r',time2,z_s1a,'m'); xlabel('time (s)'); ylabel('acceleration (g)'); title('sensor 1'); leg('x','y','z'); figure plot(time2,x_s2a,'k',time2,y_s2a,'r',time2,z_s2a,'m'); xlabel('time (s)'); ylabel('acceleration (g)'); title('sensor 2'); leg('x','y','z'); figure

plot(time2,x_s3a,'k',time2,y_s3a,'r',time2,z_s3a,'m'); xlabel('time (s)'); ylabel('acceleration (g)'); title('sensor 3'); leg('x','y','z'); figure plot(time2,x_s4a,'k',time2,y_s4a,'r',time2,z_s4a,'m'); xlabel('time (s)'); ylabel('acceleration (g)'); title('sensor 4'); leg('x','y','z'); figure plot(time2,x_s5a,'k',time2,y_s5a,'r',time2,z_s5a,'m'); xlabel('time (s)'); ylabel('acceleration (g)'); title('sensor 5'); leg('x','y','z'); figure plot(time2,x_s6a,'k',time2,y_s6a,'r',time2,z_s6a,'m'); xlabel('time (s)'); ylabel('acceleration (g)'); title('sensor 6'); leg('x','y','z');

Trial with Belt This trial is focused on the only the two sensors on the torso. Due to the variability of this trial, it seems that it will be necessary to use the 4 sensor set up.

Analysis of RMS based on the two sensors in the belt Variables labeled RMSnorm are parts of the data that are normal. With RUN 26 FINAL, Akram simulated a loss of balance incident by simply tripping over his own feet. This alone changed the peak to peak value of the signal and it can be seen in the graphs. RMSabnorm is the part of the data that contains the loss of balance incident.

RMS for data between 0 and 25 seconds: RMSnormRX =0.1609 RMSnormRY = 0.1653 RMSnormRZ = 0.1213 RMSnormLX = 0.1596 RMSnormLY =0.1903 RMSnormLZ = 0.1282 RMS for data between 25 and 30 seconds

RMSabnormRX =0.3665 RMSabnormRY =0.2985 RMSabnormRZ =0.2208 RMSabnormLX =0.3757 RMSabnormLY =0.2819 RMSabnormLZ = 0.2689 x y z Left Normal.1596.1903.1282 Right Normal.1609.1653.1213 Left Abnormal.3757.2819.2689 Right Abnormal.3665.2985.2208

Sensor placement determination involves looking at many factors each with pros and cons. The following two graphs are comparing the EMG signal between the gastrocnemius muscle and rectus femoris. When scaled, we see that the top graph has strong signal from the left leg while the right leg is quite diminished. Comparing those results to the rectus femoris we see that signal is stronger in both and is easier to distinguish. 0.005 R GASTROCNEMIUS MEDIAL HEAD (1): EMG 5->Scale, L GASTROCNEMIUS MEDIAL HEAD (1): 0.004 0.003 0.002 0.001 [Volts] 0-0.001-0.002-0.003-0.004 R GASTROCNEMIUS MEDIAL HEAD (1): EMG 5->Scale L GASTROCNEMIUS MEDIAL HEAD (1): EMG 6->Scale -0.005 1.5 2 2.5 3 3.5 4 4.5 5 5.5 6 [s] 0.0006 R RECTUS FEMORIS: EMG 1->Scale, L RECTUS FEMORIS: EMG 2->Scale 0.0004 0.0002 0 [Volts] -0.0002-0.0004-0.0006-0.0008-0.001 R RECTUS FEMORIS: EMG 1->Scale L RECTUS FEMORIS: EMG 2->Scale -0.0012 1.5 2 2.5 3 3.5 4 4.5 5 5.5 6 [s]

Analyzing mean average values we see similar results as compared to the scaled values above. We note that the gastrocnemius seems to have strong signal output for just the left leg. We believe the poor results in this trial can be attributed to improper placement of the sensor on the right leg. We can see in the graph of the femoris muscle, we have very nice graph output for both right and left leg. 0.0016 R GASTROCNEMIUS MEDIAL HEAD (1): EMG 5->MAV, L GASTROCNEMIUS MEDIAL HEAD (1): E 0.0014 0.0012 0.001 [Volts] 0.0008 0.0006 0.0004 0.0002 0 R GASTROCNEMIUS MEDIAL HEAD (1): EMG 5->MAV L GASTROCNEMIUS MEDIAL HEAD (1): EMG 6->MAV 3.5 4 4.5 5 5.5 6 6.5 7 7.5 8 [s] 0.00018 R RECTUS FEMORIS: EMG 1->MAV, L RECTUS FEMORIS: EMG 2->MAV 0.00016 0.00014 0.00012 [Volts] 0.0001 8e-005 6e-005 4e-005 2e-005 0 R RECTUS FEMORIS: EMG 1->MAV L RECTUS FEMORIS: EMG 2->MAV 3.5 4 4.5 5 5.5 6 6.5 7 7.5 8 [s]

When comparing the moving average data we see that in the first graph with sensors placed on rectus femoris, we have very clear EMG data from both legs. Unfortunately in the second graph, we see that the gastrocnemius muscle has strong EMG signal in the left leg but not in the right leg. The most likely explanation for this result is the improper placement of the sensor on the right leg. 2e-005 R RECTUS FEMORIS: EMG 1->MOV, L RECTUS FEMORIS: EMG 2->MOV 1e-005 0-1e-005 [Volts] -2e-005-3e-005-4e-005-5e-005 R RECTUS FEMORIS: EMG 1->MOV L RECTUS FEMORIS: EMG 2->MOV 3.5 4 4.5 5 5.5 6 6.5 7 7.5 8 [s] 0.00025 R GASTROCNEMIUS MEDIAL HEAD (1): EMG 5->MOV, L GASTROCNEMIUS MEDIAL HEAD (1): E 0.0002 0.00015 0.0001 5e-005 [Volts] 0-5e-005-0.0001-0.00015-0.0002 R GASTROCNEMIUS MEDIAL HEAD (1): EMG 5->MOV L GASTROCNEMIUS MEDIAL HEAD (1): EMG 6->MOV -0.00025 3 3.5 4 4.5 5 5.5 6 6.5 7 7.5 [s]

Peak Detector This is the code for detecting peaks. It works well for the first sensor but for the rest it does not. This helps us determine that the first sensor is very useful, in terms of the amplitude of the peaks. For the rest, the amplitude of the peaks varies too greatly to use. The first sensor is the right gastrocnemius. Ultimately this can be used to find the peak for any set of data; however, the threshold must be adjusted to ensure accuracy, and this must be done by looking at each set of data individually. %This will be used to find step frequency/muscle activation frequency %It works well for the first but for the rest it does not %Make sure OpenandPlot file is in same folder as data and this script %Opening Data OpenandPlot %Count the number of beats for EMG %APM is the activations per minute of each sensor %For the first sensor a threshold of.0008 works well beat_count1=0; for k=2:length(emg_s1)-1 if (EMG_S1(k)>EMG_S1(k-1) && EMG_S1(k)>EMG_S1(k+1) && EMG_S1(k)>.0008) beat_count1=beat_count1+1; APM1=beat_count1/(max(Time)/60) beat_count2=0; for k=2:length(emg_s2)-1 if (EMG_S2(k)>EMG_S2(k-1) && EMG_S2(k)>EMG_S2(k+1) && EMG_S2(k)>.0002) beat_count2=beat_count2+1; APM2=beat_count2/(max(Time)/60) beat_count3=0; for k=2:length(emg_s3)-1 if (EMG_S3(k)>EMG_S3(k-1) && EMG_S3(k)>EMG_S3(k+1) && EMG_S3(k)>.0002) beat_count3=beat_count3+1; APM3=beat_count3/(max(Time)/60) beat_count4=0; for k=2:length(emg_s4)-1 if (EMG_S4(k)>EMG_S4(k-1) && EMG_S4(k)>EMG_S4(k+1) && EMG_S4(k)>.0004) beat_count4=beat_count4+1;

APM4=beat_count4/(max(Time)/60) beat_count5=0; for k=2:length(emg_s5)-1 if (EMG_S5(k)>EMG_S5(k-1) && EMG_S5(k)>EMG_S5(k+1) && EMG_S5(k)>.0005) beat_count5=beat_count5+1; APM5=beat_count5/(max(Time)/60) beat_count6=0; for k=2:length(emg_s6)-1 if (EMG_S6(k)>EMG_S6(k-1) && EMG_S6(k)>EMG_S6(k+1) && EMG_S6(k)>.0002) beat_count6=beat_count6+1; APM6=beat_count6/(max(Time)/60)

Step Count This is similar to the peak detector, though it is based on acceleration. It takes the average of the steps per minute of each acceleration (x, y and z) and determines the steps per minute. This same script can be used to determine the count for each sensor. close all clear all OpenandPlot %Sensor 1 step_countx1=0; for k=2:length(x_s1a)-1 if (x_s1a(k)<x_s1a(k-1) && x_s1a(k)<x_s1a(k+1) && x_s1a(k)<-1.7) step_countx1=step_countx1+1; step_county1=0; for k=2:length(y_s1a)-1 if (y_s1a(k)>y_s1a(k-1) && y_s1a(k)>y_s1a(k+1) && y_s1a(k)>.5) step_county1=step_county1+1; step_countz1=0; for k=2:length(z_s1a)-1 if (z_s1a(k)>z_s1a(k-1) && z_s1a(k)>z_s1a(k+1) && z_s1a(k)>.5) step_countz1=step_countz1+1; %Sensor 2 step_countx2=0; for k=2:length(x_s2a)-1 if (x_s2a(k)<x_s2a(k-1) && x_s2a(k)<x_s2a(k+1) && x_s2a(k)<-1.7) step_countx2=step_countx2+1; step_county2=0; for k=2:length(y_s2a)-1 if (y_s2a(k)>y_s2a(k-1) && y_s2a(k)>y_s2a(k+1) && y_s2a(k)>.5) step_county2=step_county2+1; step_countz2=0; for k=2:length(z_s2a)-1 if (z_s2a(k)>z_s2a(k-1) && z_s2a(k)>z_s2a(k+1) && z_s2a(k)>.5) step_countz2=step_countz2+1;

%Steps per minute %Take average of all step counts SPM1=((step_countx1+step_county1+step_countz1)/3)/(max(Time)/60) SPM2=((step_countx2+step_county2+step_countz2)/3)/(max(Time)/60)