A Kinematic Model to Predict a Continuous Range of Human-Like Walking Speed Transitions

While constant speed gait is well understood, far less is known about how humans change walking speed. It is also unknown if the transition steps smoothly morph between speeds, or if they are unique. Using data from a prior study in which subjects transitioned between five speeds while walking on a treadmill, joint kinematic data were decomposed into trend and periodic components. The trend captured the time-varying nature of the gait, and the periodic component captured the cyclic nature of a stride. The start and end of the transition were found by detecting where the trend diverged from a ±2 standard deviation band around the mean of the pre- and post-transition trend. On average, the transition started within half a step of when the treadmill changed speed (<inline-formula> <tex-math notation="LaTeX">${p\ll {0}.{001}}$ </tex-math></inline-formula> for equivalence test). The transition length was 2 to 3 steps long. A predictive kinematic model was fit to the experimental data using Bezier polynomials for the trend and Fourier series for the periodic component. The model was fit using 1) only constant speed walking, 2) only speed transition steps, and 3) a random sample of five step types and then validated using the complement of the training data. Regardless of the training set, the model accurately predicted untrained gaits (normalized RMSE <inline-formula> <tex-math notation="LaTeX">${ < {0}.{4} \approx {2}^{\circ} }$ </tex-math></inline-formula>, normalized maximum error generally <inline-formula> <tex-math notation="LaTeX">${ < {1}.{5} \approx {7}.{5}^{\circ} }$ </tex-math></inline-formula>). Because the errors were similar for all training sets, this implies that joint kinematics smoothly morph between gaits when humans change speed.


I. INTRODUCTION
N ORMAL gait is a fundamental component of a healthy and active lifestyle [1], [2].In the course of normal daily living, an individual will utilize a variety of gaits, walking in frequent short bouts [3], at various speeds, and with frequent starts and stops [4].Complex neurological control allows seamless transitions between these various gaits [5].Despite the importance of gait transitions, there is very little research on them.For those with impaired gait, transitions are far more challenging [6].Active assistive devices can improve gait [7], [8], [9], [10] and allow a more active lifestyle.For these devices to be effective, they must provide predictable assistance optimized for the wearer [11], [12].Current control approaches generally switch between a set of pre-defined taskspecific controllers based on sensed conditions [13], [14], [15].These control schemes provide accurate device control, but are not designed to smoothly transition between differing tasks, such as start, stop, walk-to-run, run-to-walk, or transitioning between two non-zero speeds in a way that mimics normal human gait.
Gait transitions involving gait initiation [16], gait termination [17], [18], [19], [20] and the run-to-walk/walk-to-run transition [21], [22], [23] tend to occur over a 1-2 step interval.Similar to other gait transitions, changing from one constant speed to another constant speed (herein referred to as a "speed transition") requires changes in spatiotemporal [24], [25], kinematic [25], and kinetic [26], [27] parameters.These changes occur over 1-3.5 steps, indicating that speed transitions may be slightly longer than other transitions, but are almost certainly less than 9 steps [24].Given that many gait transitions are approximately two steps, this paper hypothesized that the joint angles during speed transitions changed over a two step period.This hypothesis was particularly informed by [26] which found a two-step transition period for a speed reduction of similar magnitude to our work.It was also informed by prior analysis of step length for the dataset used in this work [24] which found that the median steps to converge was 0-2 steps.Because step length is a function of joint configuration, it was expected that the kinematics changed over approximately the same interval.
While there is limited research on speed transitions, there is substantial research on kinematic changes between different speeds.Most critically, joint ranges of motion tend to increase as speed increases [28], [29], [30], [31], [32].These increases occur asymmetrically about the mean joint angle, causing the both the mean joint angle and the joint variance to change with a change in speed.From a mathematical perspective, this means that joint angles during transitions are non-stationary signals.For this reason, a model trained on stationary kinematic data collected from constant speed experiments cannot be assumed to capture the non-stationarity of speed transitions, and transition from one periodic, constant speed gait to another in a predictable way that mimics normal human walking.This motivates the need for a kinematic model which captures the non-stationarity of the transient kinematics that occur when a person changes walking speed and can provide reference trajectories for a continuum of speed transitions.
There are multiple ways to address the complexity of generating speed transitions, all of which involve the morphing of one periodic gait into a second periodic gait.In robotics, several groups have split the gait cycle into segments and combined the segments using linear [33] or nonlinear [34] methods.This can also be done for the whole gait cycle [35].Another approach is to explicitly design unique controllers for each possible steady and transition gait [36], but this quickly grows intractable for large numbers of transitions.For biomechanics, several groups have fit functions to constant-speed joint angle trajectories and used these functions to generate transitions [37], [38], [39].One option is to fit the joint angles using an n-dimensional hyper-surface parameterized by a phase variable (percentage of gait cycle) and any number of tasks [38].This method works very well for at least constant speed walking and running on flat and incline surfaces [38], [39], and can be adapted to work for stairs [40].With the fitting done offline, this method lends itself to implementation in a trajectory-tracking controller for an assistive device.It also readily accommodates additional tasks (start, stop, running, sitting, etc.).However, it is unknown if transitions between tasks fall on the hyper-surface or if they deviate from the surface.
Using the hyper-surface method in [38] and experimental speed transition data from [24], this work developed a unified joint kinematic model for both steady walking and continuously varying transition gaits.The model accepts initial and target speed as inputs and returns the corresponding joint trajectory.This work tested the hypothesis that the errors between the modeled and experimental joint kinematics would be small and of similar magnitude regardless of if the model was trained using constant speed data, speed transition data, or a mix of the two.This work also tested the hypotheses that the transition between speeds occurred over two steps and that for treadmill walking, transitions between speeds started when the treadmill changed speeds.

A. Experimental Data
The data from [24] was used.The experiment received Institutional Review Board approval from the Pennsylvania State University (study number STUDY00011094), and all subjects provided informed consent.In these experiments, 21 healthy subjects aged 18 to 62 years old (median (range), 10 male, 11 female, height 169 (159-184) cm, mass 68.9 (46.5-90.7)kg, BMI less than 30) walked on a split-belt instrumented treadmill (Bertec, Columbus, OH).Subjects walked in both a constant speed regime and a speed change regime.The constant speed regime consisted of one minute trials at one of 5 leg length and mass normalized [41] walking speeds, v * ∈ {0.40, 0.43, 0.47, 0.50, 0.53} → {1, 2, 3, 4, 5}, which constitutes a range of approximately (1.25-1.67)m/s.For the speed change regime, subjects walked at a starting speed v * s for 14 steps, facing an eye-level visual display with a step counter and a shaded bar chart indicating current speed.After 14 steps, an outlined bar was added to the chart indicating the upcoming treadmill speed.This step is termed the notification step.After an anticipatory region of 3 steps, the treadmill accelerated to the new speed v * e .Thus, the treadmill ran at one speed for a total of 17 steps before transitioning to the next speed.To reach the new speed before the next heel contact, the treadmill accelerated both belts at 2 m /s 2 during the single support period of the transition step.There were no perceptible delays in accelerating the belts.The anticipatory region allowed subjects to prepare for the speed change, rather than having to react to a disturbance.These transitions were carried out randomly and sequentially until all 20 unique combinations of speed change had been recorded.The combination of starting and ending speeds will be called the "task" to be consistent with the terminology used in Embry et al [38].Each subject completed 10 of these 20-transition serial speed change trials.During the trials, ground reaction forces (GRF) were measured at 1000 Hz using the force plates embedded in the treadmill.Kinematics were recorded at 100 Hz using a motion capture system (Vicon, Oxford, UK) with the Plug-in gait lower-body marker set.The data were synchronized using a Vicon Lock+ box.During post-processing, trials with significant gaps in the recorded marker trajectories were omitted, leaving 3,005 trials with continuous data.The kinematic data were separated into steps using a GRF threshold of 4.9 N (corresponding to 1% of a 50 kg subject), then resampled to 100 points per step as is typical.

B. Signal Decomposition
The sagittal plane hip, knee, and ankle joint angles (θ ) were modeled as where T is the trend component that varies with speed and P is the periodic component driven by the gait cycle.This form most naturally captures the increasing range of motion with increasing walking speed observed in human gait [28], [29], [30], [31], [32].As is typical, the trend for the i th observation (data point) was extracted via a moving average filter: using a symmetric window of one step (K = 99), where θ i is the i th observation of the joint angle, and T i is the trend value calculated at data point i.Because gait has a period of two steps (one stride), using a symmetric window with one step before and after point i gives the average over one period.Conceptually, the trend captures shifts in the joint angle.For joint angles, the trend typically increases when the range of motion increases and decreases when the range of motion decreases.The detrended periodic component was recovered by dividing the experimental signal by the trend, P i = θ i/T i although it was not used for any additional analysis.The periodic component captures the cyclic, repetitive nature of gait.

C. Characterize Transitions 1) Detect Divergence and Convergence:
To identify when subjects modified their gait to change speeds, sequences of 24 steps around the treadmill speed change were considered (Fig. 1).These sequences started 9 steps before and ended 15 steps after the treadmill changed speed, so that the treadmill speed change occurred on step 9.This region was chosen to give as many steps as possible for analysis while simultaneously avoiding the transition region from the previous speed change and the notification region for the next speed change.
The start of a subject's transition for a particular joint was defined as when the trend began to diverge from the pre-transition steady-state value.Similarly, the end of the transition was defined as when the trend converged to the post-transition steady-state value.Specifically, the steady-state steps were defined as steps 2-5 and 19-22 for the pre-and post-transition regions, respectively.A band of steady-state trend values was defined as µ pr e/ post ± 2 • S D pr e/ post where µ pr e/ post is the mean of the pre-or post-transition trend and S D pr e/ post is the standard deviation of the pre-or posttransition trend.The step-axis data points where the trend exited the pre-transition band (s D ∈ R) and entered the post-transition band (s C ∈ R) defined the start and end of the speed transition, where the subscripts D and C indicate divergence and convergence, respectively.Because s D and s C are real numbers, the transition can start and end at any point within the step.The transition length was s D , s C , and ℓ were found separately for every joint of every transition.
To be considered a valid divergence or convergence event, the trend signal had to cross out of or into the appropriate band for at least 1 /2 of a step and be in the region of validity.For divergence, the region of validity started at the notification step (step 6) and ended three steps after the treadmill changed speed (step 12).For convergence, the region of validity started when the treadmill changed speed (step 9) and ended 7 steps after the treadmill changed speed (step 16).Only transitions with both divergence and convergence in the appropriate region of validity were analyzed further.
2) Specify Transition Region: The observed transition starts (s D ) were tested against the hypothesized transition onset of step 9 ± 1 /2 using an equivalence test (TOST, Two One-Sided T-tests) [42] with a 5% significance level.This test was performed for all subjects, joints, and tasks (unique combinations of starting and ending speeds) combined to obtain a single overall measure (one test).To determine if there were subject-specific variations, TOST was performed for each subject individually by combining all joints and tasks (21 tests).In addition, TOST was performed for each joint and task individually (120 tests: 3 joint types × 2 sides × 20 tasks), and then summarized using n T O ST/n total , where n T O ST is the number of tests with a statistically significant result and n total is the number of tests.This final set of tests allowed us to determine if the transition start had large variations between joints or tasks but did not permit further statistical analysis between groups.
To determine if the transition region was 2 steps long, TOST was used to test if the transition length (ℓ) was within 1 /2 step of the hypothesized value (α = 0.05).Similar to the tests for the transition starts, the lengths were tested for all subjects, joints, and tasks combined (one test), for each subject individually (21 tests), and for each joint and task individually (120 tests).

D. Gait Modeling 1) Additional Data Processing
e ), an inter-subject mean ( θi j ) and standard deviation (S D i j ) was taken over all subjects and trials.There were a total of 25 tasks -20 unique speed transitions (v * s → v * e , s ̸ = e), and 5 repeated transitions (v * s → v * e , s = e) representing constant speed walking.All trials were checked for outliers.Iterating over all phase points i, any trial with a point θ i j < θi j −3•S D i j or θ i j > θi j +3•S D i j was deemed an outlier and removed.91% of the data (2,735 trials) was retained after outlier removal.
Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.
2) Predictive Kinematic Model: The predictive model for joint kinematics was based off the work in [38] which constructed a basis model to approximate joint kinematic trajectories at various speeds.Using the posited form (1) of the kinematic trajectories, together with knowledge of the speed dependent behavior of the joint angles [28], [30], [32], a set of N = 4 basis functions was chosen.Each basis is composed of a periodic component and a trend component.
The periodic component was modeled by a Fourier series of order M = 10 [43]: where the coefficients β cmn are the optimization variables, and subscripts c, m, and n represent the associated function type (constant, cosine, sine), harmonic (0 th , 1 st , . .., M th ), and basis index (1,2,. ..,N ), respectively.0 ≤ φ < 1 is a cyclic, monotonically increasing (except at the transition from 1 to 0) phase variable with a period of one stride.For this work, φ was time divided by stride duration.
The trend components were modeled using Bezier polynomials.Specifically, the N = 4 Fourier series (s n ) at a given phase point formed a set of Bezier coefficients and an associated polynomial in the speed-joint angle plane.These polynomials b n (φ, ψ) were parameterized by the phase variable φ and a task vector ψ = [v s , v e ] which contained the initial speed (v s ) and target speed (v e ): where ν(φ, ψ) maps the current phase point and task vector to the current speed in the phase-speed plane.To match the shape of the observed center of mass speed profile, a cubic function was used for ν: where v = v e − v s is the difference in walking speed, and the coefficients were set to achieve zero slope at φ = 0 and φ = 1.To utilize the entire Bezier polynomial input range, the anthropometrically normalized speed range [0.40, 0.53] was further normalized onto the range [0.2, 0.8], and these fully normalized values (v s , v e ) were used in the task vector.
(5) assumes that all transitions start at the modeled leg's heel strike and end at the next heel strike of the same leg (i.e. the transition is one stride long).Thus, the overall form of the predictive kinematic model is a function of phase and task, and has the multiplicative form, where q is the modeled joint angle.( 6) captures the motion of a single stride.To model multiple strides, φ goes from 0 to 1 repeatedly.Depending on what ψ is, (6) generates joint angles for steady walking or a speed transition.Modeling the mean experimental joint angle with (6), at a discrete phase point φ i , and for a task ψ j gives: where θ is the mean experimental value, and ϵ i j is the model error.
3) Optimization: In order to arrive at a parsimonious model which accurately captures the complexity of human gait, the two-step optimization from [38] was employed.The first optimization step reduced the number of basis functions using sparsity-inducing norms.The second optimization step minimized the error (ϵ) between the training data and the model using only the bases deemed significant in step one.Additionally, the second objective included jerk reduction to more smoothly fit the model to the data.Both tasks used the Disciplined Convex Programming package CVX for Matlab (CVX Research Inc. Stanford, CA).
The optimization variables were the Fourier coefficients β cmn .Towards a matrix representation to facilitate programming in Matlab, the coefficients for the Fourier series were placed into a vector x ∈ R N (1+2M)×1 .A single Fourier series without coefficients, at a discrete phase point, was represented in vector form as To represent all of the Fourier series, c i was put into a block diagonal matrix C i ∈ R N ×N (1+2M) .The N Bezier bases at phase point φ i and task ψ j were assembled into a row vector: Using the just defined matrices, the kinematic model ( 6) was written as q(φ i , ψ j ) = b i j C i x.This was inserted into (7) and rearranged to express the error at the i th phase point and j th task as In preparation for the optimization, ϵ i j was defined as an absolute error ρ scaled by the standard deviation S D i j at phase point i and task j: Using ( 11) and ( 12), the step one optimization was minimize where λ is a regularization parameter, (x) is a penalty function Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.and b i jn and x n were the Bezier and Fourier coefficients for a single basis function.In the penalty function, b i jn c i x T n was calculated at each phase point and task, and the L ∞ -norm was taken.This was done for all N bases, and then the L 1 -norm was taken across the N bases.
By adjusting λ, the less important bases were regularized, leaving only the bases required to achieve the desired model accuracy.To determine the required number of bases, principal component analysis was performed on the entire data set for each joint.The number of required bases was set to the number of eigenvalues larger than 1, plus an additional basis to account for the non-zero mean.This resulted in 2 bases for each joint.The most significant bases were found by iteratively adjusting λ until only the required number of bases had the condition The step one optimization was performed using all available data.For all joints, the significant bases were b 1 (constant) and b 4 (speed squared).Before performing the second optimization step, all terms in b i j (10) corresponding to b 2 or b 3 were set to zero.
Using only the two significant bases, a new optimization to minimize the maximum error was defined: 2, . . ., 200 and ∀ j = 1, 2, . . ., 5 (15) where δ is the jerk reduction weight.For the i th phase point and j th task, jerk was defined as Then, J ∈ R 200J ×N (1+2M) was a matrix with rows corresponding to J i j .The jerk reduction weight was chosen by observing the effect it had on the error and the qualitative smoothness of the modeled trajectories.The final value used was δ = 10 −7 .The step two optimization was performed using a subset of the transitions.The error for all training sets was quantified using the 20-task validation sets D C p , where the superscript C denotes the complementary set of tasks not in set D p .The maximum error for each task in a validation dataset was defined as Then, a vector containing the maximum error for each task in the validation dataset was defined as E p = e p1 e p2 . . .e pz , where z is the number of tasks in the validation set (20 for D 1 and D 2 , or 231,000 for D 3 ).E p was summarized using the mean (E µ ) and maximum (E max ).Additionally, the normalized mean absolute error (NMAE) was calculated for all test splits: where n pj = 20 (D C 1 and D C 2 ) or n pj = 231, 000 (D C 3 ) validation tasks.
6) Stance and Swing Considerations: Because the two legs were 180 • out of phase, they could not be aggregated directly for training.The data was split and named according to the leg's major function during the first step of the transition.Thus, the swing data was the data from the leg that had its swing phase during the first step of the transition, i.e., the trailing leg at the heel strike that started the speed change.The stance data was the data from the leg that remained in stance during the first step of the transition, i.e., the leading leg at the heel strike that started the speed change.Models for the stance and swing leg were trained separately with their respective experimental data.Training and validation for the stance model was straightforward, with the stance models validated using the stance data.However, some changes were required for the swing data.Because the swing leg's phase variable φ was 0.5 at the start of the transition, it had to be phase shifted in the speed function (5) so that the swing leg's speed went from the starting to ending speed appropriately (Fig. 3): where φ * is the shifted phase variable.The non-shifted phase variable φ was used in the periodic component so that the transition stride consisted of a swing step followed by a stance step.To determine if the stance and swing leg trajectories could be generated from the same model, the swing models were validated using the stance data.

III. RESULTS
This section first briefly discusses the trend's ability to detect divergence from the initial speed and convergence to the new speed, then provides statistical results for the transition start and length.The section concludes with the kinematic model results.

A. Detecting Divergence and Convergence
As expected, the joint trajectories changed when walking speed changed, and this was visually apparent in both the original joint angles and in the trend for the decomposed signal (Fig. 4).For the hip and knee, the trend components behaved as expected, with an increase in walking speed resulting in an increase in the trend.In contrast, the ankle exhibited trends that mostly decreased for increasing speed transitions.For all joints, the periodic components had nearly constant amplitude after dividing out the trend.
The percentage of transitions that displayed valid divergence and convergence ranged from 30-61% when transitions were  grouped by signed transition magnitude and joint.All joints for both stance and swing tended toward higher percentages at larger magnitudes, with all minimums occurring at a ±1 speed change and all maximums occurring at a ±4 speed change.
The stance and swing sides both had similar percentages of divergence and convergence.Over all transitions, 44% of transitions displayed valid divergence and convergence.

B. Transition Starts and Lengths
The mean transition start (s D ) was step 9.2 ± 1.3 steps.According to TOST, it was statistically equivalent to the hypothesized value of step 9 (i.e., when the treadmill changed speed, p ≪ 0.001, Fig. 5(a)).All 21 subjects had mean transition starts that were statistically equivalent to step 9 ( p < 0.01).There was, however, considerable variation between individual transitions.As a consequence of the validity region, all transition starts were at or above step 6.The latest transition starts were around step 11.Because divergence and convergence was found separately for each joint, the transition typically appeared to start at different times for each joint.Over all joints and sides, the swing knee and ankle had the largest proportion of transition starts that were statistically equivalent to step 9 (Table I, 85%), while the minimum percentage occurred at the swing hip (50%).The stance and swing sides both had overall percentages of approximately 70%.Transition magnitude did not have a consistent effect on when the transition started.
The mean transition length (ℓ) was 3.0 ± 1.8 steps, and was not statistically equivalent to the hypothesized value of 2 steps ( p ≈ 1, Fig. 5(b)).This was also true for individual subjects

TABLE II MEAN AND MAXIMUM OF MAXIMUM ERROR VECTOR E AND NORMALIZED MEAN ABSOLUTE ERROR (NMAE). SWING VALUES ARE FOR A PHASE-SHIFTED SWING MODEL VALIDATED AGAINST STANCE DATA. ALL ERRORS ARE DIMENSIONLESS. ALL ERRORS ARE SMALL AND INDICATIVE OF CLOSE APPROXIMATION
(mean ℓ was 2.8 to 3.2 steps).Similar to the transition starts, there was considerable variation between transitions, with transition lengths ranging from almost 0 to approximately 9 steps.The distribution was right skewed with a mode of approximately 2 steps.Neither transition magnitude, transition direction, nor joint substantially affected transition length.

C. Gait Prediction
Models were fit on training sets D 1 (constant speeds only), D 2 (speed transitions only) and D 3 (all training splits) and validated over their respective complements.The errors between validation data and model predictions were small across all three measures for all three training sets (Table II, Fig. 6).The errors with the transition training set (D 2 ) were generally slightly smaller than errors with the constant speed training set (D 1 ).The maximum error for all training splits (D 3 ) was considerably larger than for the other two training sets (E max = 3.30 vs. 1.15), although the NMAE was similar.The reported swing errors were found by phase-shifting the swing models and validating against stance data.Not surprisingly, the swing errors were slightly larger on average.
As the intent of this predictive model is to supply trajectories to robot and assistive device controllers, the model must be capable of generating aperiodic gait signals which are combinations of constant speed walking and speed transitions.Generating a multi-stride speed transition gait that walks at an initial constant speed for one stride, then transitions over one stride to a final speed, and continues at the final constant speed for one stride results in a smooth C ∞ curve with small errors (Fig. 7).These gaits can be composed of any combination of speeds and transitions.II).
For training sets D 1 and D 2 , the maximum errors were generally less than 1 standard deviation of the experimental data, indicating an excellent match.The maximum error for the all-splits set (D 3 ) was about three times larger, but was still generally less than 3 standard deviations of the experimental data, indicating that even the most inaccurate points were still well within the range of observed experimental variation.The mean errors were considerably smaller for all three training sets, with most being less than 30% of the experimental standard deviation, indicating that the model trajectories matched the experimental trajectories very well.For all training sets, the errors for the leg that started the transition with the swing phase were larger than for the leg that started the transition in stance.This is likely because both the stance and swing leg models were validated against stance data.Nevertheless, the errors were generally smaller than the errors in Embry et al. [38].This is expected as the current model did not address the additional dimension of incline.
The closeness of the fit between the transition-trained and constant speed trained models implies a similarity between constant speed walking and transitions.These results show that speed transitions and constant speed walking are fundamentally similar from a control perspective.This should make controlling powered assistive devices easier because the Fig. 7. Plots of inter-subject mean experimental data (solid green), model trajectories (red dashed), and error (solid blue) for a speed transition generated from a model trained exclusively on speed transition data.The COM speed (purple) is also shown.For this example task, the maximum absolute errors are 2.26 • , 3.30 • and 3.57 • for the hip, knee and ankle, respectively.The modeled trajectories are an accurate approximation of the experimental data for trained and untrained speed tasks.
desired joint kinematics are simply a function of gait phase and current speed and do not explicitly depend on if the person is transitioning between speeds or not.Despite this, it may still be important to have an outer controller that specifies the task and instantaneous speed.While several forms for the speed function (5) were briefly tested, it was quickly determined that a cubic speed function produced the best results.This function was supported by several factors.It is intuitive that changes in walking speed would occur smoothly and gradually even in cases of abrupt acceleration.It gives a continuous COM speed profile when constant speed steps and transition steps are concatenated.Lastly, the plotted COM speed profile in [26] and [44] all show a gradual departure from the initial speed and an asymptotic approach to the final speed.Thus, the cubic function lends itself to generating smooth multi-step trajectories with small errors.
While all three training sets worked well, there were small differences between the results.The model trained with speed transition data (D 2 ) had slightly smaller errors than the model trained with constant speed data (D 1 ) in 11 out of 18 comparisons.The slightly smaller errors in the transition-trained model may be due to the larger number of discrete speeds represented in the transition data.The constant speed data has a number of speeds equal to the number of experimental speeds.Here, there were 5 speeds.On the other hand, during a transition, every point in the phase cycle represents a new speed determined by the speed function (5).Thus, the number of speeds represented in a single transition is equal to the number of phase points (n pts = 200).Training on transition data with 200 times as many speeds represented is likely why the transition-trained models perform better.
The likely reason why D 3 had small mean maximum error and NMAE, but large maximum error is due to the specification of the training sets.The training sets contain 5 tasks which must, in some combination, represent the smallest and largest speeds as both initial and final speeds.There are several configurations over the 11,550 individual training splits that result in a condition where only two initial or final speeds were represented.This condition makes fitting the quadratic speed basis b 4 impossible at the end points.While this condition only occurs at the end points, it may be enough to cause large maximum errors at one end of the phase cycle, which due to the large number of test splits, had a negligible effect on the mean maximum error and NMAE, but manifested in the maximum error.Alternatively, this could have occurred because of redundant data points.The experimental speed transition data was such that in the phase-speed plane, each initial speed had 5 corresponding final speeds, and vice versa for a total of 25 transition types.This could have resulted in each endpoint having as many as five values of angle at the same point in the phase-speed plane, but setting the number of training tasks to 5, and imposing the inclusion constraint led to the maximum number of redundant data points being 3. Since it was unlikely that all of the values at a particular point were identical, this would tend to increase the maximum error.It also more heavily weighted the endpoints when fitting the model.The redundant values only occurred at the endpoints because the even number of phase points used in the fitting ensured there were no central points where symmetric trials coincided.
To determine the transition period, one assumption was that the change would begin at or around step 9 as this is when the treadmill changed speed.We assumed that a three step warning was a sufficient anticipatory region based on the 2 step visual window required for step planning [45].Additionally, it was assumed that the transition would begin at heel strike.While the strong correlations between the COM state and mediolateral foot placement suggest feedback control of the swing leg [46], [47], Patil et al. [48] was able to simulate these same correlations in the absence of within-step control.This suggests that the control input for the upcoming step may be executed at double support.For this reason, the TOST test equivalence region was set to a one-step interval (step 9 ± 1 /2 step) around the intervening double support period where the change in kinematics was likely to originate.The results supported these assumptions (Fig. 5a).We also hypothesized that the transition length was two steps, thus ending the transition at a double support period.The results did not support this hypothesis (Fig. 5(b)), although there was a very large range of observed transition lengths.Due to the large range of transition length and the mode around two steps, we treated the transition as two steps long for the modeling portion of the work.This assumption simplified the modeling work, particularly for the instantaneous speed function (5).As written, (5) assumes that that the transition was exactly one stride long, beginning at heel strike.It could be modified so that the transition takes three steps, but this would require keeping track of the transition stride to correctly map the current phase to the instantaneous speed.It could also be modified to begin or end partway through a stride, but again this would require a more complex function.
In contrast to our results, [25] identified a single transition step for the joint angles when transitioning to speeds above and below a normal walking speed.The experiment in [25] was overground and the speeds were self-selected.These two differences might explain why [25] found a one step transition and we found an approximently three step transition.Because our study prescribed the treadmill speed and subjects had to remain on the 1.8 m long treadmill, this imposed some limitations on the transition.It is possible that freely selected transitions may use a different number of steps.A limitation of this work is that the treadmill speed was not directly measured.Thus, it is possible that the actual and commanded treadmill speed profiles were slightly different.Even if this occurred, it was a consistent bias across all subjects and conditions.Using the true treadmill speed may slightly change some values, but it is unlikely to fundamentally change the results.In addition, subjects could not perceive any treadmill acceleration/deceleration outside of the single support period with the commanded speed change, so they are unlikely to have altered their gait even if the actual treadmill speed change took slightly longer than commanded.However, different treadmill speed change methods may impact the transition, e.g., a discrete change as was done in this study vs. a gradual change over many steps.Future work is needed to understand how humans transition between speeds in daily life.
In addition, the analysis method used to identify divergence and convergence could be improved.While the analysis method used here appears to be sensitive enough to capture key kinematic changes in all of the joint angle signals, the percentage of trials demonstrating clear divergence and convergence of the mean trend was less than anticipated.Possible causes of the low rate of detection are the relatively small differences in the trend before and after the transition, the imposition of the validity regions onto the pre-and post-transition trends, and the number of steps the trend must remain in each band.In developing the trend divergence and convergence algorithm, several cases preventing successful mean trend divergence and convergence were encountered.The most straightforward case was when the trend neither diverged nor converged.Despite removal of the periodic signal component, many trends retained significant noise, particularly given that peak joint angles often only differed by a few degrees before and after the speed change.The noise resulted in large standard deviation bands with enough overlap to preclude divergence and convergence.Even when divergence and convergence were detected using the algorithm, visual inspection showed that the transition starts and ends were not clear and could arguably fall within a large (> 1 step) range.Another case involved the overlapping of bands and created a condition where a trend converged into the post-transition band before diverging from the pre-transition band.These two cases made up the bulk of the undetected divergence/convergence.Preliminary work indicated that the method failed to identify divergence and convergence points (s D and s C ) more frequently for smaller transitions because the difference in trends was smaller.However, the spread of the s D and s C distributions were similar regardless of transition magnitude, indicating that the method failed to identify divergence and convergence for the smaller transitions, rather than shifting it earlier or later.While not observed in this study, the multiplicative decomposition will fail, particularly for the periodic component, if the trend (2) is near zero.Additional work with a different method, such as doubly repeated measures of MANOVA [49], is needed to more definitively determine when the transition starts and how long it is.

V. CONCLUSION
This work accomplished two main objectives.The first was to identify and quantify the transition region in the joint angle signals from speed transition trials to better understand how humans change walking speed.The second was to develop and train a unified predictive kinematic model capable of capturing both the transient kinematics of non-steady gait and the consistent kinematics of steady gait.In pursuit of the first objective, the joint kinematic signals were decomposed into a time-varying trend that captured overall changes from stride to stride and a periodic component that captured the cyclic nature of a stride.By analyzing the trend, the beginning and end of the transition was identified.Although there was considerable variability between trials, on average the transition started when the treadmill changed speed and lasted three steps (Fig. 5).
The second objective was achieved by developing and validating a kinematic model capable of reproducing the observed joint angle data.The model (6) consisted of a periodic Fourier series multiplied by Bezier polynomials to capture the trend.To allow for speed transitions, the trend was a function of instantaneous speed, which in turn was a function of progression through the gait cycle and the desired change in speed.The model proved accurate with small maximum and NMAE errors for all training scenarios (constant speed only, speed transition only, and mixed transition/constant speed), but appeared most accurate when trained on transition data.In addition to capturing speed transitions and constant walking, the model was also capable of generating accurate swing leg trajectories given proper phase-shifting.Thus, the model developed here is capable of generating a continuum of constant speed gaits and the human-like speed transitions necessary to change between them.

Fig. 1 .
Fig.1.Plot of representative hip trend (top) and commanded treadmill speed (bottom).The treadmill was running at the slowest speed for the first 9 steps before accelerating to the fastest speed.The acceleration started at step 9's toe-off and completed before the next heel strike.The subject was shown the new speed at the start of step 6.The subject started his transition when he diverged from the pre-transition steady-state band and ended his transition when he converged to the post-transition steady-state band.The pre-and post-transition bands are defined as ±2 standard deviations about the mean trend in the pre-and post-transition steady-state regions (pink bars in the figure).As is typical, the trend varied (noisily) around a constant value before the treadmill speed change, had a clear change over a relatively short duration, and then varied (noisily) around a new constant value after the speed change.

Fig. 2 .
Fig. 2. Plots of training set trajectories in the phase-speed plane for training sets D 1 (left, constant speed), D 2 (center, transitions), and D 3 (right, combination).The plot for D 3 shows only one 5 task training set.

4 )
Training and Validation Data Sets: To test model accuracy, and to demonstrate the ability to train the model with sparse data, the full dataset was split into three types of training sets (D p ) according to the type of task used (constant speed, transitions, or combination, Fig. 2).Each training set was composed of 5 non-repeated tasks.The first training set (D 1 ) was composed of strictly constant speed data.This evaluated the ability of the model to predict transition gaits when trained with purely constant speed data.The second training set (D 2 ) consisted of only speed transitions and evaluated the converse of D 1 .The third training set (D 3 ) was the collection of all possible non-repeated 5-task training sets satisfying the inclusion constraint.This resulted in a collection of 11,550 5-task training sets.To be included in the training set, the data were required to include some combination of transitions that represented the initial speeds v * s = {0.40,0.53} and final speeds v * e = {0.40,0.53}.This ensured that at least two speeds were represented at each phase point.5) Quantifying Model Error:

Fig. 5 .
Fig. 5. Transition (a) starts and (b) lengths over all joints, speed change tasks, and subjects.Dashed vertical lines indicate the hypothesized values for transition start and length.While there is considerable spread, the maximums of both distributions are close to the hypothesized values.

Fig. 6 .
Fig. 6.Surface plots of experimental data with speed transition training trajectories (blue dashed), and constant speed validation trajectories (solid red) for the hip, knee, and ankle.The close agreement between model and validation data is visually apparent.The maximum absolute errors for the plotted validation trajectories are 2.26 • , 2.16 • and 1.42 • for the hip, knee and ankle respectively.

TABLE I PERCENTAGE
OF TRANSITION TASKS (UNIQUE COMBINATIONS OF STARTING AND ENDING SPEEDS) WHERE THE TREND DIVERGENCE STEP (s D ) WAS STATISTICALLY EQUIVALENT TO STEP 9. STANCE AND SWING PERCENTAGES WERE SIMILAR, BUT JOINT PERCENTAGES WERE HIGHEST AT THE ANKLE AND LOWEST AT THE HIP