Data from: The adaptive role of the knee joint in maintaining the orbital stability during slope walking
Abstract
Maintaining gait stability on sloped surfaces is a biomechanically demanding task. Previous studies revealed the effect of slopes on overall gait stability, but the joint-level mechanisms underlying the stability still remain unclear. Given that most walking assistive devices focus on providing additional torque to specific joints without considering the contribution of each joint to the stability, understanding the role of each joint in stabilization can enable the design of a safer intervention. In this study, we aimed to identify joint-specific contributions to gait stability by analyzing maximum Floquet multipliers (max FM) and their corresponding eigenvector across multiple gait phases and slope conditions. Results were obtained from data of thirteen participants walking on a treadmill at five slope gradients. The max FMs remained mostly invariant across slopes and phases, whereas the eigenvector components of the bilateral knees showed significant phase- and slope-dependent changes. These variations exhibited alternating patterns between limbs and were moderately correlated with joint angle variability, highlighting the knee’s adaptive role in maintaining stability. Our findings provide new insights into joint-level stabilization strategies and suggest that assistive devices should be designed not to interfere with the role of the knee in ensuring stability during slope walking.
Floquet Multiplier Analysis from Kinematic Data (MATLAB Code)
This folder (Data.zip) contains MATLAB scripts used to compute Maximum Floquet Multipliers (maxFM) and eigenvector components corresponding to the max FM from lower-limb joint kinematics during slope walking.
The code extracts stride-to-stride state transition dynamics at both heel-strike and toe-off* events to evaluate orbital stability.
Code Overview
| Script | Description |
|---|---|
FM_14Dim.m |
Main MATLAB script including both heel-strike and toe-off Floquet multipliers analysis. |
Each analysis estimates the Jacobian matrix (14×14) describing the stride-to-stride linear mapping of joint-angle errors, from which the eigenvalues (FMs) and eigenvectors are extracted to characterize orbital gait stability.
Prerequisites
- MATLAB R2022a or later
- Signal Processing Toolbox (for
findpeaks) - OS: Windows 10 (tested)
Folder Structure
MATLAB_FM_Analysis
│
├── /MaxFm_code/ FM_14Dim.m # Main script (includes both analyses)
│\
│ ├── N1/ # Input data folder (subject-wise)
│ │ ├── N1_Down1_6degree.txt
│ │ ├── N1_Down1_12degree.txt
│ │ ├── ...
│ │ └── N1_Up3_12degree.txt
│ ├── N2/
│ └── ...
└── N13
Input Data
Each .txt file must contain joint angle trajectories and marker coordinates from a single slope-walking trial.
The script automatically processes all subject folders (N1, N2, …) within the main directory:
mainFolderPath = "{Base_directory_path}\Data";
Columns
ITEM: Frame or sample indexRight_Hip_*,Left_Hip_*: Hip joint angles (unit: degrees)Right_knee_*,Left_knee_*: Knee joint angles (unit: degrees)Right_ankle_*,Left_ankle_*: Ankle joint angles (unit: degrees)RIGHT_HIP_*,LEFT_HIP_*: Hip joint center coordinates (unit: meters)RPSI_*,LPSI_*: Right and Left Posterior Superior Iliac Spine marker coordinates (unit: meters)RCAL_*,LCAL_*: Right and Left Calcaneus marker coordinates (unit: meters)
The suffixes _x, _y, and _z indicate the three coordinate or rotation components.
Column names are case-sensitive. For example, Right_Hip_x represents a joint angle, whereas RIGHT_HIP_x represents a hip joint center coordinate.
Columns Used
- 14 joint-angle variables (cols 2–8, 11, 14–19)
- Hip joint centers (cols 20 & 23)
- Toe markers (cols 32 & 35)
Algorithm Summary
- Data Loading: Import
.txtdata usingreadtable. - Event Detection: Identify heel-strike or toe-off indices using
findpeaks(MinPeakDistance = 0.1 s). - Stride-to-Stride Mapping: Extract two consecutive stride segments (
end-211:end-12,end-210:end-11). - Jacobian Estimation:
- Solve each column using least squares:
(M'*M)\(M'*M_next(:,i))
- Solve each column using least squares:
- Floquet Multiplier Calculation:
- Compute eigenvalues and eigenvectors of the Jacobian.
- Take the maximum absolute eigenvalue as the dominant FM.
- Output:
- Store in
resultandeigenvector_results.
- Store in
Key Parameters
| Parameter | Description | Default |
|---|---|---|
time_standard |
Minimum time between peaks (s) | 0.1 |
sampling_rate |
Sampling frequency (Hz) | 100 |
selected_columns |
Indices of joint angles | [2,3,4,5,6,7,8,11,14,15,16,17,18,19] |
end-211:end-12 |
Index window for pre-stride data | adjustable |
Example Output
File 1: N1_Down1_6degree.txt, Max Floquet Multiplier: 0.53452
File 2: N1_Down1_12degree.txt, Max Floquet Multiplier: 0.51232
Notes
- Toe-off and heel-strike analyses are independent but identical in logic.
- Trials 1–6 are treated as downhill,7-9 as Level,10–15 as uphill, determining heel-strike and toe-off.
Citation
This code is released under the Creative Commons Zero (CC0) waiver.
While you are not legally required to cite this repository, if you use this code in your research or project, we kindly request that you cite our paper as an academic courtesy:
Lee, J.†, Kim, C.L.†, Park, I., Moon, J., & Ahn, J.* (2026). The adaptive role of the knee joint in maintaining the orbital stability during slope walking. Royal Society Open Science.
Human subjects data
All participants of this study have consented to publish de-identified data in the public domain, denoted as subject numbers.
