Advice on processing raw gait data

Hi,
I collected gait data using a force plate several years ago as a part of an experiment. The data is raw data, a sample of which I am attaching in an excel file. As I have very limited experience in MAT LAB, (however I would really really like to learn) i would appreciate any insights into this data and on how to proceed with it so that I can extract parameters such as step length, stride length and cadence etc to come to some conclusive results and findings.
i hope i am not being too ambitious, but i would really appreciate any help on how to proceed further.
Thanks a lot! Jen

 Accepted Answer

Getting the data and variable names is straightforward:
[d,s,r] = xlsread('jennifer aniston Gait Data.xls');
var_names = s(11,:);
What am I looking at? What experiment did you do?
What are the data? (Force is obvious.) What are x and y? They seem to be displacements, but how to they factor into all this?

15 Comments

This was collected while subjects carried a certain load on their body and walked on a 2 meter long force plate by the company zebris. This information was provided on the information sheet.
Information sheet?
The .xls file is pretty cryptic, and I didn’t see any other files attached. The ‘information sheet’ would be helpful, since I have no idea what x and y are.
Also, what’s ‘COP’?
COP is center of pressure. I am attaching the original notepad file. This is how the equipment delivers raw data. Hope it will clear the doubts. Thanks!
I believe this particular data is for stance analysis and not gait and therefore parameters of displacement. The subjects stood still with load. If you scroll down you would see data under right forefoot, right backfoot, left forefoot and left back foot headings.
The data for gait analysis is attached. I am sorry for the confusion.
The 1st notepad file was for stance analysis and the 2nd notepad file titled 'gait data sample' is gait data file.
Thank you for the information (that seems to be duplicates of the .xls file, so it unfortunately adds nothing).
So far, we have someone standing on a force plate bearing a load.
Is there any other information you’d like to share that might put this into some context?
EDIT (01 October 2016 at 21:25 UTC)
This is as far as I can get with ‘Gait data sample.txt’:
fidi = fopen('jennifer aniston Gait data sample.txt','rt');
d{1} = textscan(fidi, '%f%f', 'HeaderLines',67, 'CollectOutput',1, 'Delimiter','\t', 'EndOfLine','\r\n');
right_foot = cell2mat(d{1});
figure(1)
plot(right_foot(:,1), right_foot(:,2))
grid
xlabel('Time (sec)')
ylabel('Force (N)')
There is no valid end-of-file statement, and the data are extremely difficult to parse because the content and format vary. Some of the data are derived, statistical or other summaries of other data, and some are raw.
This appears to have been produced with other software. If you can save only the raw data to a text or Excel file, without the intermediate analysis summaries, that would be preferable. I have no idea what else to suggest.
Thank you for taking out time to study my data.
I have pasted the alternate right foot and left foot force data starting with the right foot contact with force plate in the 2nd column in the excel 'gait data modified'. Had to do a bit of back and forth to pick right foot data from the bottom and left foot data from the top part of the notepad file. The first column has the corresponding time of contact with the force plate.
the notepad is confusing since the force exerted by the left foot is listed together and not alternatively with the right foot. First left foot heel strikes at time=950, 2nd left foot @ t=5300, 4th @ t=8570, 5th @t=13010.
Similarly right foot heel strikes @t=1550, 2nd right foot @t=4710, 3rd @t=7980, 4th @t=9170 and so on. The force plate was just long enough for the subject to step on it twice or thrice. the subject then had to turn around and walk back.
The left foot data is in the first half of the sheet and right foot data in the latter half. A break in time for example between time 3690 and 3700 shows the end of one gait cycle and beginning of the next. one gait cycle may contain 2 heel strikes or 3.
My pleasure.
This would probably be easier for both of us with separate .xls files for the left foot and right foot. Is that an option?
It would be relatively easy for me to put them together in my code. I can identify the start and end of each stride easily enough, but identifying left foot and right foot is the problem.
(I’m not ignoring you — I’m in the UTC-6 timezone, so just starting my day.)
Thanks for your reply....I was beginning to worry...brrrrr
Attaching separate files.
That works!
What do you want to do with your data?
Wow! Thanks so much Star Strider!
Well first of all wanted to know if it worked...now that you have confirmed, i would really want to extract various parameters such as step length, stride length and cadence, also swing time if possible.
the automatically generated notepad gives those parameters but i would like to be able to find them on my own. Would that be possible?
My pleasure!
We can probably get times, and from them, frequencies, but not lengths. Lengths might be possible if we have a way — such as constant walking speed — that would allow some sort of conversion between time and distance.
The one problem we have is that the data are not constant. There are significant gaps in the record. What do you want to do about them?
The Plot
Thanks!
constant walking speed would not be possible to get since the subjects were asked to walk at their comfortable speed.
Regarding the gaps, I will have to check for more consistent data sets.
also, the codes that you provided anthony, would work on this data as well i believe?
from the plot i can see certain overlaps. they point to another problem which is that since the length of the gait platform allowed only 2 to 3 heel strikes, the time between gait cycles will not be even. What can be done about that?
I just checked...I missed copying some data from notepad to excel...those are the gaps...my bad!
Star Strider
Star Strider on 2 Oct 2016
Edited: Star Strider on 2 Oct 2016
My pleasure!
O.K. Without knowing the walking speeds, subject-specific distances aren’t possible to calculate.
Data without gaps are important. It’s not possible to interpolate missing data here.
Probably. Anthony’s data have a clearly defined single peak. Yours do not, making that slightly more difficult. If you’re willing to accept a ‘peak’ as either of the two peaks in each stride in your data, then you can use the code I wrote for Anthony without modification. The 50 N threshold will also apply to your data. You may have to make certain modifications if the format of your data are different than his, (his are very consistent, and that helps significantly) but you should be able to adapt the analysis with minimal changes.
EDIT Added to address Jen’s added edits:
‘the time between gait cycles will not be even’
I’m not certain how to deal with that. It’s an instrumentation problem you have to decide how to work with in your experiment design. Perhaps putting lasers and detectors on both ends of your force plate (perpendicular to the walking direction) to use as event detectors would allow you to approximate walking speed.
With the gaps filled, you should have no problem using the code I wrote for Anthony. One change you may want to make is to increase the 50 N threshold to 100 N. In the data I plotted, I noticed that the 50 N point may be obscured in some strides by a sampling irregularity. The threshold change should not make a significant difference, since the slopes are nearly vertical in that region.
Well, you have been most helpful to tolerate my silly questions!
The gaps are not an issue anymore since it was copy pasting job gone wrong.
Yeah I am curious as to why Anthony's data has a single peak since gait data would give 2 peaks, where the 1st peak would show heel strike and the 2nd toe strike.
Is there any way and need to connect these fragmented gaits into one continuous gait cycle? or would that distort our data and purpose?

Sign in to comment.

More Answers (0)

Categories

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!