Question
Project 3: Gait Cycle While walking, a gait cycle is essentially everything that happens from the time your heel strikes the ground to the next
Project 3: Gait Cycle While walking, a gait cycle is essentially everything that happens from the time your heel strikes the ground to the next time that same heel hits the ground. When your foot hits the ground (known as heel strike), your foot is pushing forward, so the ground reaction force (GRF) that is measured by the force plates is pushing backward (negative) to match your force and keep you upright. Likewise, when your foot comes off the ground at the end of stance phase (known as toe-off), your foot is pushing backward, so the ground reaction force is forward (positive). The stance phase is the period of time that the foot is in contact with the ground during each step. Essentially the negative portion of the stance phase is when you're braking, or catching yourself from falling over, while the positive portion of the stance phase is when you're pushing yourself forward towards your next step - propulsion. Treadmill-based training interventions are often used to improve walking post-stroke. A study was done to determine how healthy participants propulsive and braking impulses change with an induced asymmetric gait and on a treadmill in adaptive mode. Nine healthy adults were recruited for this study. Each participant walked on a fixed-speed instrumented split-belt treadmill with one belt, chosen at random, at the participants self-selected (SS) speed, and the other at half of that speed. After 4 minutes on this fixed-speed treadmill (FTM), the treadmill transitioned to adaptive control (ATM) for an additional 4 minutes. The adaptive treadmill control system updated the speed of each treadmill belt independently of the other in real-time based on the participants propulsive forces, location on the treadmill, step length, and step time. In addition, participants completed 1-minute baseline trials on the FTM with each belt moving at the participants SS speeds. The forces measured during this study are recorded in an excel file gait_cycle.xls. The forces in this file are in the anterior-posterior direction (forward/backward). Your task in this project is to read the force data provided in the excel file and plot the average and deviations of the propulsion and braking components of the gait cycles for various settings. Youll then need to plot how the average force applied by all participants over time in various settings. Open the Excel file and look at each of the sheets so you understand the layout of the data. Each sheet contains the data for a trial and each column contains the data for an individual participant. The data points are measurements of the braking and propulsion forces. This project tests your ability to read documentation and to piece together how code should work. You must implement the below functions. We strongly suggest you to read their descriptions and draw a flow chart for how your code should be put together. For design help, refer back to the previous 2 projects. We strongly suggest you to refer to the MATLAB documentation: https://www.mathworks.com/help/ Your impulse figure should look like this: Your average force plot should look like this: Required Functions: 1) readData: consumes a file name (str), sheet name (str), and participant column letter(str) and returns the gait cycle data for that participant in the excel files sheet. Excel uses uppercase letters to designate columns. You will use this column letter to build a string representing the range of cells you want to read. See MATLAB documentation for xlsread function. 2) returnPositivesOrNegatives: consumes a column vector of floats and a logical value (boolean) indicating whether the function should return a column vector of positive numbers (when passed true) or a vector of negative numbers (when passed false). 3) calculateImpulse: consumes a series (represented by a column vector of floats) and computes the integral of the series using trapezoidal numeric integration. The integral of these values is the impulse. You must examine the MATLAB documentation and use the trapz function. 4) plotImpulses: consumes 2 TxP matrices where T is the number of trials (e.g. baseline, Slow FTM, Fast FTM, etc) and P is the number of participants (indicated by the number of columns in the excel file) and each entry in the matrix is the impulse of the corresponding person. The first matrix should represent the propulsion impulse while the second matrix represents the braking impulse. Download the barwitherr.m file from Canvas. This function plots the impulses in the same style as the above figure using the bar chart with error bars..You must label your x-axis ticks Propulsion and Braking corresponding with the positive and negative data points. You must include the legend for Baseline, Slow FTM, Fast FTM, Slow ATM, and Fast ATM. Your Y-axis must be labeled Impulses. You must read the documentation for the bar chart in order to determine how to use it. Your function should return the plots properties which can be created by wrapping your call to barwitherr inside of the get() function. 5) calculateAverageAcrossParticipantAtIndex: consumes an PxD matrix where P is the number of participants and D is the number of data points in the gait cycle data collection and an entry index (int) and produces the average force applied by all participants at the corresponding entry index (column). 6) plotAverageForce: consumes a TxD matrix where T is the number of trials (e.g. baseline, Slow FTM, Fast FTM, etc) and D is the number of data entries in the gait cycle data collection---each entry in the matrix represents the average force applied across all participants---and plots the average force applied over time (i.e. each row in the excel file) of all participants for each trial. You must include the legend for Baseline, Slow FTM, Fast FTM, Slow ATM, and Fast ATM Your x-axis must be labeled Stance Phase and the Y-axis must be labeled Force. Your function should return the plots properties which can be created by wrapping your call to plot inside of the get() function. Required Script: 7) Write a script called project3.m that produces the plots shown in the figures above using the file gait_cycle.xls file. Start with the flowcharts you created for the functions described above and add the missing steps you will need prior to writing code. Publishing Your Project: 8) After you finish steps 1-7, you will publish your project3.m script.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started