1 Introduction

The ankle has a major role in transferring ground reaction forces to the body during locomotion. Human locomotion during activities of daily living (ADL) include walking on a straight path, walking on inclined surfaces, climbing or descending stairs, navigating among obstacles, turning around corners and even more dynamic motion such as jumping and running. The ankle is important during these activities because it responds to ground reaction forces and it keeps the body in a stable position. During ADL, the lower extremity muscles contract to modulate the mechanical impedance of the ankle and provide shock absorption during heel-strike and propulsion during the push-off phase. The mechanical impedance can be described as the resulting torque caused by external motion perturbations and can vary based on the effects of mass-inertia, damping, and stiffness (Rastgaar et al. 2010; Ficanha and Rastgaar 2014). To improve the understanding of the neuromuscular properties of the ankle, characterization of the complex relationship between ankle impedance and lower extremity muscle activation levels is required.

Modulation of the ankle impedance occurs in the sagittal, frontal, and transverse anatomical planes; resulting in rotations of the foot in dorsiflexion-plantarflexion (DP), inversion-eversion (IE), and external-internal (EI) degrees of freedom (DOF), respectively, as shown in Fig. 1. The ankle mechanical impedance in the sagittal plane has been a main concern for many research efforts because of its substantial rotation during straight walking. However, during ADL locomotion is not restricted to straight path. In fact, it was reported that on average turning steps account for 35–45% of all the steps, ranging from 8 to 50% during four representative daily activities (Glaister et al. 2007). Studies have shown that ankle motion and ground reaction forces in the transverse plane significantly change between straight walking and various turning maneuvers (Glaister et al. 2007, 2008; Taylor et al. 2005; Ficanha et al. 2015). One of these studies found that the ankle range of motion in the transverse plane was approximately 22° during straight walking, but decreased by approximately 31% to 16° during a step turn (Ficanha et al. 2015). This significant difference between maneuvers implies that the dynamics of the ankle varies to account for changing ankle angles and ground reaction forces.

Fig. 1
figure 1

The ankle anatomical planes and its coordinate system

Most prostheses that are currently available to transtibial amputees do not account for the ambulation requirements in the transverse plane (Glaister et al. 2007). This limited degree of freedom can cause additional shear stresses to be added to the residual limb of the amputee, resulting in discomfort, skin abrasions, and can lead to secondary injuries. Traditional transverse rotation adaptors (TRA) have been used to provide some compliance and reduce the torques applied at the socket (Olson and Klute 2015), however these devices typically only provide a fixed passive stiffness element. Recently, a variable stiffness torsion adaptor was designed to be able to change stiffness and allow for different levels of compliance in the transverse plane. This device was shown to reduce the maximum transverse plane moments applied to the socket while an amputee performed a turning and twisting maneuver (Pew and Klute 2015, 2017). One limitation to this work is that the stiffness cannot vary based on the maneuver, the amount of muscle activation, or the user’s intensions. Additional research is required to quantify the ankle impedance in the transverse plane to improve the design of the variable impedance ankle–foot prosthesis that will be able to significantly reduce the shear stress on the amputee’s residual limb.

Previous work determined the impedance of the ankle with the use of a multivariable stochastic system identification method. Used by numerous research groups, this well-established method could estimate the quasi-static and dynamic ankle impedance in all three anatomical planes while at stationary conditions (Lee et al. 2011, 2014a, b, c; Ficanha et al. 2015). In one study, the Anklebot, consisting of two back-drivable linear actuators, was used to apply pseudo-random position perturbations to the ankle and measure the resulting position and torque response. Initial studies determined the multivariable mechanical impedance of the ankle in DP and IE during relaxed and active muscle co-contraction (Lee et al. 2014). The experiments were performed when the lower extremity muscle activations were relaxed and at 10% of the subject’s maximum voluntary contraction (MVC) and a dynamic model to represent the coupling between the DP and IE DOF was developed. Using the same stochastic system identification method, the impedance in the EI direction for both relaxed and co-contracted muscles was determined by applying perturbations in the transverse plane of the ankle (Ficanha and Rastgaar 2014; Ficanha et al. 2015).

Furthermore, defining the relationship between electromyography (EMG) signals from a muscle group to its corresponding joint movements can lead to advancements in methods for controlling prostheses based on the amputee’s intensions (Gopura et al. 2013; Kearney and Hunter 1990). Previous work has used EMG to determine the linear relation between upper extremity muscle activation levels and joint stiffness for both static and dynamic conditions (Osu and Hiroaki 1999). A few studies have used neural networks to relate EMG signals to the upper extremity joint stiffness, joint trajectories, and joint moments required for human motor control tasks (Kim et al. 2009; Schöllhorn 2004; Wang and Buchanan 2002; Lester et al. 1997). For example, one group explored the feasibility of using EMG to predict the dynamic arm movements of the elbow and wrist joints with the use of a neural network (Pulliam et al. 2011). However, there is a gap in the literature to define the complex relationship between the lower extremity joint impedance in the transverse plane and the corresponding EMG signals.

The authors recently developed a method to use artificial neural network (ANN) as a learning framework for defining the relationship between the lower extremity muscle signals and the ankle impedance in the sagittal (DP) and frontal (IE) planes (Dallali et al. 2017). From previously described methods, the Anklebot was used to quantify the ankle mechanical impedance of nine subjects. Each test was performed at three different muscle co-contraction levels, indicated by the magnitude of the lower leg’s muscles EMG signal. The EMG root-mean-squared (rms) was determined from four lower extremity muscles, selected based on their contribution to ankle movement and postural balance. The tibialis anterior (TA) was chosen as it contributes to inversion and dorsiflexion of the ankle, the peroneus longus (PL) is a dorsiflexor of the ankle, while the soleus (SOL) and the gastrocnemius (GA) are plantarflexors of the ankle joint (Basmajian 1979; Di Giulio et al. 2009). After training, the ANN could estimate the ankle impedance with the EMG signals alone with approximately 89% mean accuracy in DP and 88% mean accuracy in IE (Dallali et al. 2017).

However, the literature does not report the relationship between lower extremity muscle activation and the mechanical impedance in the transverse plane (EI). This study is a continuation of an effort to estimate the mechanical impedance of the ankle in all three planes of rotation based on muscle activation levels in the lower extremity. The mechanical impedance of the ankle with relaxed, 10 and 20% muscle activation levels was determined for ten unimpaired subjects. Using an improved method from previous work, the functional relationship between the two variables was determined with the use of a feedforward ANN. The results of this work not only contribute to the understanding of ankle function in the transverse plane, but also provides insight on a method for defining the ankle dynamics from a musculoskeletal point of view. This approach will be beneficial towards the design and control of an ankle foot prosthesis that will reduce the amount of shear stress applied to the socket, provide for a more natural gait, and allow the user to have control of their desired motions.

This paper is structured as follows. Section 2 describes the methods, experimental protocol, and the ANN modeling approach used in this study. Section 3 presents the results of the proposed ANN modeling approach. Section 4 provides discussion of the experimental results and how they compare to previous studies. The conclusions are given in Sect. 5.

2 Methods

This section describes the experimental setup and procedure used to determine the functional relationship between lower leg muscle activation and the mechanical impedance of the ankle. This experiment used EMG sensors to measure the muscle activations of four lower leg muscles and the Anklebot to estimate the ankle mechanical impedance. An ANN was trained to find the relationship between the measured EMG and estimated impedance.

2.1 Stochastic impedance identification

2.1.1 Experimental setup

Ten unimpaired subjects (five females, five males with mean age of 25 ± 3 years, mean weight of 75 ± 15 kg and mean BMI of 23.8 ± 4.3 kg/m2) with no self-reported history of biomechanical or neuromuscular disorders participated in the experiments. This research was approved by the Michigan Technological University Institutional Review Board and all the subjects provided the written consent to participate in the experiments.

First, the Anklebot was used to determine the mechanical impedance of the ankle in the EI direction. The applied torque and angular displacement were recorded using current sensors to measure the motor torque (Burr-Brown 1NA117P), with a nominal resolution of 2.59 × 10−6 Nm, and two linear incremental encoders (Reinshaw®), with a resolution of 5 × 10−6 m. To estimate the impedance in the EI direction, the Anklebot actuators were placed parallel to the ground in order to apply a torque in the transverse plane (Ficanha et al. 2015).

As shown in Fig. 2, the Anklebot (1) was mounted below a custom-made chair to allow for the actuation of the ankle in the transverse plane. The subjects were seated in the chair with their feet above the ground. A modified shoe (2), with an aluminum bracket attached to the sole, was placed on the subject’s right foot. The moving ends of each actuator were attached to the aluminum bracket, allowing for rotation of the foot in the EI direction. To ensure an accurate ankle position measurement, the laces of the shoe were securely tied to avoid any slipping of the foot within the shoe. The vertical position of the Anklebot was adjusted for each subject by changing the height of the bar which the Anklebot was mounted (3) so that the actuators remained parallel to the ground. To maintain the horizontal position of the Anklebot, a knee brace (4) and supporting straps (5) were used to fix the subjects’ leg and isolate any rotations by the hip and knee joints. The knee angle was measured using a goniometer and was fixed at 90° with respect to the shin. This brace was attached to a supporting frame using straps to suspend the leg, hold the weight of the Anklebot system, and to prevent motion in other anatomical planes, as described in Lee et al. (2014) and Rastgaar et al. (2014). A shin brace (6) was also attached to prevent motion in the sagittal plane. After positioning the knee, the ankle angle was also placed at 90° in the sagittal plane and the Anklebot actuators were calibrated to save this position as the origin. This set up ensured that the actuators remain parallel to the floor and that the ankle would rotate only in the transverse plane.

Fig. 2
figure 2

The overall experimental setup shown from the side view and the isometric view. Placement of the EMG sensors on the lower leg muscles as well details of the experimental setup are shown

Next, the Delsys® Trigno™ EMG system was configured using the EMGWORKS® data acquisition software. This system recorded EMG signals at 1925 Hz over a wireless connection, bandpass filtered the signal between DC-500 Hz, and used patent pending motion artifact suppression to reduce low frequency noise. As shown in Fig. 2, four EMG sensors were placed on the TA (6), PL (7), SOL (8) and GA (9) muscles. Rubbing alcohol was used to clean the subjects’ skin and remove any natural oil, providing a good electrical connection. The sensors were placed on the skin near the bellies of each muscle using hypoallergenic tape. In addition, to prevent the sensor from loosening during the experiment, an additional piece of medical tape was wrapped around the leg to assure the sensor remained in place. An initial test of each sensor was performed to ensure that the sensor placement was correct and the signal could be measured.

2.1.2 Experimental protocol

In this experiment, the Anklebot was controlled in active impedance mode with active stiffness of 12.8 Nm/rad and no damping. These values were selected based on the previously used protocol to prevent drift and to hold the foot near the center position (Ficanha et al. 2015). For each test, pseudo-random command voltages with bandwidth of 100 Hz were applied to each actuator to produce maximum torque perturbations of 15 Nm (Ficanha et al. 2015). The command voltage to each actuator was identical in magnitude and opposite in direction, resulting in a rotation with an rms value of 0.065 rad about the ankle EI direction. The Anklebot recorded the applied force and displacement of each actuator at 200 Hz.

At the beginning of each experiment, the subjects were asked to co-contract their lower leg muscles at the maximum level, without moving the ankle, to determine their MVC. After several repetitions, the co-contraction of the TA muscle with the highest EMG voltage was selected and used for the following experiment. The subjects were instructed to perform three tests that measured the ankle impedance with three different TA muscle activation levels.

As shown in Fig. 3, the Anklebot applied perturbations to the ankle and measured the resulting angular displacements while the subjects’ TA muscle was relaxed, at 10% of the MVC level, or at 20% of the MVC level. These measurements were fed into the stochastic system identification as described in Sect. 2.2.3. For the first test, the subjects kept their TA muscle relaxed while the Anklebot perturbations were applied to the ankle. During the tests with 10% MVC and 20% MVC, the subjects were asked to reach each level by adjusting the contraction of their TA muscle, accordingly. Since the TA contributes to both inversion and dorsiflexion of the foot, its contraction assures muscle co-contraction of antagonistic muscles responsible for eversion and plantarflexion. Because the motion in DP, IE, and EI are a combination of rotations of the ankle subtalar complex, monitoring the TA muscles provides a level of voluntary co-contraction at the ankle in all anatomical planes, and thus these were chosen as the reference muscles for the subjects to maintain at either 10 or 20% MVC.

Fig. 3
figure 3

Block diagram of the signal processing performed to obtain impedance and to train the ANN, where \( p \) is the perturbation, \( \theta \) and \( \tau \) are measured ankle angle and torque, \( Z(f) \) is the identified impedance, and \( \tilde{Z}(f) \) is the ANN estimated impedance

The length of each test was 70 s and the recorded data were truncated to 60 s to remove transient data at the beginning of each trial. The subjects were able to see their muscle activation levels in real time using a computer monitor, allowing them to follow and maintain their muscle at 10 or 20% MVC for the entire duration of the test. The three tests were repeated five times for a total of 15 tests to ensure repeatability and consistency.

2.2 Artificial neural network

2.2.1 Overview of ANN

The goal of this study is to develop a continuous functional mapping between the rms of the EMG signals and the frequency dependent mechanical impedance of the human ankle with different muscle activation levels. This function can be defined as:

$$ \varvec{y} = g(\varvec{x},\,f) $$
(1)

where y is the output ankle impedance in the EI direction; x is the rms values of the four EMG signals across each test and f is the frequency in which the impedance is defined. A promising tool that can address this function approximation problem is ANN because of its ability to estimate linear and nonlinear functional relations (Funahashi 1989).

In this study, the Matlab® Neural Network Toolbox was used to develop an ANN model with the varied muscle activation levels (relaxed, 10% MVC, 20% MVC). As shown in Fig. 4, each model consisted of a multilayered feedforward neural network, with five inputs, a hidden layer with 60 neurons, and an output layer with two neurons. \( \omega_{ij} \) is the weight of the connection from the inputs \( i \) to neuron \( j \) in the hidden layer and \( \varepsilon_{jk} \) is the weight of the connection between neuron \( j \) in the hidden layer and the output neuron \( k \), where \( i = 1, \ldots ,5 \), \( j = 1, \ldots ,60 \) and \( k = 1,2 \). In addition, each neuron of the hidden and output layer had a constant offset (bias), shown as \( \left\{ {\begin{array}{*{20}c} {b_{1} } & {b_{2} } & \cdots & {b_{62} } \\ \end{array} } \right\} \) in Fig. 4. The weights and biases were selected and tuned during the ANN training process. Sixty neurons were chosen based on the prediction results of the ANN model. A higher number of neurons can lead to overfitting the data and a poor generalized ANN model while a smaller number of neurons is not sufficient to fit the experimental data. Further guidelines on selecting the number of neurons in the hidden layer are provided in the literature (Karsoliya 2012).

Fig. 4
figure 4

A two-layered feed forward neural network, consisting of input nodes, a hidden, and an output layer

2.2.2 Design of input matrix

The input matrix had five inputs; four rms EMG signal inputs, generated by the four muscles (TA, PL, SOL, and GA), and one input for the impedance frequency range. Before building the input matrix, the rms EMG values across each round of experiments were normalized with respect to the rms EMG value of the relaxed muscle test.

$$ \bar{x}_{n} = \frac{{\bar{x}}}{{relaxed\,\,\bar{x}}} $$
(2)

This was necessary because there was still a small EMG signal during the relaxed muscle test, ranging in rms magnitude between 0 to ± 20 µV, as shown in Fig. 5.

Fig. 5
figure 5

Bandpass filtered and rms EMG values of lower leg muscles during relaxed muscle experiment

In addition, the input matrix included the frequency of the ankle impedance that ranged between 0.7 to 4.1 Hz. This range was selected to be less than the break frequency of the estimated impedance. Based on previous work, we can assume that this region is where the effects of stiffness are dominant (Ficanha et al. 2015). This frequency data from all the tests were fixed, resulting in a total of 18 frequency measurements within the range. The resulting input submatrix for a single test was a 5 × 18 matrix that took the form:

$$ \left( {r_{m} } \right)_{5 \times 18} = \left[ {\begin{array}{*{20}c} {\bar{x}_{n} (TA)} & {\bar{x}_{n} (PL)} & {\bar{x}_{n} (SOL)} & {\bar{x}_{n} (GA)} & f \\ \end{array} } \right]^{T} $$
(3)

where \( r_{m} \) is the input matrix from a single test with an index \( m = \{ 1, \ldots ,15\} \) for the 15 performed tests. After 15 tests the total input matrix, R, for the ANN model is made up of 15 submatrices from Eq. 3, where \( r_{1} \) is the first relaxed muscle trial, \( r_{2} \) is the first 10% MVC trial, \( r_{3} \) is the first 20% MVC trial, and so forth. The input matrix, \( R, \) to the neural network is given in Eq. 4

$$ R = \left[ {\begin{array}{*{20}c} {r_{1} } & {r_{2} } & \cdots & {r_{15} } \\ \end{array} } \right]_{5 \times 270}. $$
(4)

2.2.3 Design of target matrix

Next, the impedance estimation was used to develop the target matrix necessary to train the ANN model. The ankle impedance was estimated for the three levels of muscle activation: relaxed, 10% MVC, and 20% MVC. During each of these tests, the Anklebot measured the total torque output and the ankle rotation in the transverse plane. The auto power spectral density of the input angular displacement \( P_{\theta \theta } (f) \) and the cross power spectral density between the displacement and output torque measurement \( P_{\tau \theta } (f) \) were used to estimate the impedance of the system, \( Z(f) \). The estimated transfer function is the ratio of the two spectrums as described in Eq. 5.

$$ Z(f) = \frac{{P_{\tau \theta } (f)}}{{P_{\theta \theta } (f)}} $$
(5)

To estimate this transfer function the tfestimate function in Matlab® was used. The method used in tfestimate implements the Welch’s averaged modified periodogram method, which is based on the quotient of the cross power spectral density of the torque and angle, \( P_{\tau \theta } (f) \), and the auto power spectral density of angles \( P_{\theta \theta } (f) \). A hamming window with the size of 512 points, an overlap of 256 points, 1024 FFT points and a sampling frequency of 200 Hz were used in tfestimate. The size of the windows and number of points were chosen to reduce both bias and variance. A narrow window results in small bias but high variance for the estimated transfer function and vice versa (Ljung 1999). The coherence of the derived transfer functions were also calculated using the mscohere in Matlab® and were used to validate each impedance transfer function. Equation 6 shows the coherence between the total torque and ankle angles

$$ {\text{Coherence}} = \frac{{\left| {P_{\tau \theta } \left( f \right)} \right|^{2} }}{{P_{\tau \tau } \left( f \right)P_{\theta \theta } \left( f \right)}}, $$
(6)

where \( P_{\tau \tau } (f) \) is the auto power spectral density of the measured output torque. However, Eqs. 5 and 6 use the torque measurement of the total system. This includes the torque provided by the Anklebot, shoe, and the ankle, as described in (Rastgaar et al. 2009). The motion of the Anklebot, shoe, and ankle are the same; therefore, the impedance is in parallel and the Anklebot and shoe can be subtracted from the total estimated impedance. Using the same estimation procedure, an additional test was performed without the human subject, to determine the impedance of only the Anklebot and shoe. The impedance of the ankle is derived as

$$ Z_{ankle} = Z_{ankle + Anklebot + shoe} - Z_{Anklebot + shoe} . $$
(7)

The advantage of stochastic methods over steady-state procedures is that they provide a quantitative estimate without requiring any a priori assumption about the order or dynamic structure of mechanical impedance (Rastgaar et al. 2009). The estimated real and imaginary coefficients of the impedance transfer functions were used as the target matrix for ANN modeling. Using the real and imaginary impedance proved to be more numerically efficient than using the impedance magnitude and phase. The impedance transfer function for each subject was estimated over the desired frequency range, resulting in 18 real and imaginary impedance values with a frequency resolution of 0.1921 Hz. The target submatrix for a single trial was modeled as

$$ y_{i} = \left[ {\begin{array}{*{20}c} {{\text{Real}}_{i} \left( {f} \right)} \\ {{\text{Imag}}_{i} \left( {f} \right)} \\ \end{array} } \right]_{2 \times 18} . $$
(8)

After the impedance transfer function was estimated for all 15 trials, each submatrix was concatenated to create a 2 × 270 target matrix. This matrix will be used to train the ANN model and is defined in Eq. 9

$$ Y = \left[ {\begin{array}{*{20}c} {y_{1} } & {y_{2} } & \cdots & {y_{15} } \\ \end{array} } \right]_{2 \times 270}. $$
(9)

2.2.4 Training the ANN

The final step in the experimental process was to train the ANN model until a relationship between the input matrix and the target matrix was derived. To endow robustness to the ANN against EMG signal variations, the data were split into training, validation, and testing data, using 70, 15, and 15% of the total data sets, respectively. The training data set was used to train the ANN and determine the appropriate weights and biases. To derive the best impedance model \( \tilde{Z}(f) \), as shown in Fig. 3, the training was repeated until a desired regression and network output error were achieved. For this study, the model for each subject was trained between two to five times. The validation data set was used to monitor the training performance to new inputs. The training was completed by observing that the validation error reached a minimum. Then, the testing data set was used to evaluate the predictive quality of the trained model. All of the ANN models were trained in batches using the Levenberg–Marquardt algorithm (Marquardt 1963).

3 Results

The results of the ankle mechanical impedance estimation, using the recently proposed stochastic identification method (Rastgaar et al. 2009), is presented in this section. The recorded EMG signals and the estimated ankle impedance were used as input and target data to train the ANN network. It is shown that ANN can accurately reconstruct the ankle impedance at the three levels of muscle activation. To evaluate the quality of ANN model, various performance metrics such as the mean squared error, regression and histogram plots are presented.

3.1 Ankle impedance estimation using system identification

The mean and standard errors of the dynamic impedance of a representative subject in EI direction within frequency range of 0.7–4.1 Hz is shown in Fig. 6. The standard error is calculated using \( SE = s/\sqrt n \) where \( s \) is the standard deviation computed over five repetitions of each test and \( n \) is the number of samples. As expected the magnitude of the ankle impedance is increasing with muscle activation, as was reported for DP and IE directions in Lee et al. (2014). The corresponding coherence function was computed based on spectral analysis using Eq. 6 for the transfer function estimates. The average coherence across all subjects was greater than 0.88, and validated the system identification linearity assumption (Fig. 6).

Fig. 6
figure 6

Average magnitude (a), phase (b), and coherence (c) plots of the ankle impedance for a representative subject in the EI rotation direction with relaxed muscles, 10% MVC, and 20% MVC. The shaded areas are the standard errors (SE)

The averaged magnitude of the impedance for all the ten subjects are presented in Fig. 7 for relaxed, 10 and 20% MVC tests. The standard error of the overall impedance in the frequency range of 0.7–4.1 Hz are shown in the bar plots. In addition, the averaged impedance phase and standard error for each subject are presented in Fig. 8.

Fig. 7
figure 7

Mean impedance magnitudes for all the subjects with: a relaxed muscle, b 10% MVC, and c 20% MVC. The bars indicate the mean value of the magnitude across five trials. The magnitudes are shown in linear scale. The whiskers below and above the bars indicate the average standard error across five trials

Fig. 8
figure 8

Mean impedance phases for all the subjects with: a relaxed muscle, b 10% MVC, and c 20% MVC. The bars indicate the mean value of the phase across five trials. The whiskers below and above the bars indicate the average standard error across five trials

Once the ankle impedance was estimated from the stochastic identification method described in Sect. 2.2, the target impedance values for training the ANN models were obtained.

3.2 Ankle impedance estimation using ANN

After the ANN model was trained, the resulting impedance predicted by the ANN were derived across 0.7–4.1 Hz. The ANN predictions for a representative subject are shown in Fig. 9 (solid line). These results were compared with the mean impedance frequency plots derived using the system identification method (dashed line). In addition, the training performance of the ANN is shown in Fig. 10 for the same representative subject. It is shown that the network for the representative subject converged to the best performance (least amount of mean squared error) within four epochs. Similar results were observed for the ANN training performances of the other subjects who participated in the experiment.

Fig. 9
figure 9

Results of the ankle impedance for a representative subject derived from the experimental approach and the impedance modeled by the proposed ANN in the EI rotation direction with relaxed muscle, 10% MVC, and 20% MVC

Fig. 10
figure 10

Overall regression plots of the representative subject derived for 15 trials with: a training, b validation, c testing, and d all data

A few techniques were used to verify that the networks were properly trained. During training and validation, the mean squared error (mse) between the output and target impedance of the network was determined. The networks continued to iterate until the mse converged to the best performance. If the mse did not converge to a solution, it is possible that the network overfit the data. For all ten subjects, the networks converged to the smallest mse within 15 iterations (epochs) of the training and validation process, showing that the networks did not overfit the training data.

3.3 ANN regression

The regression plots presented in Fig. 10 provide insight to how well the ankle impedance was modeled and estimated by the neural network. In these plots, the real and imaginary impedance predictions from the neural network were plotted against the experimental impedance data. The regression plots for the training, validation, testing and overall results for a representative subject are shown in Fig. 10a–d, respectively. The overall trained ANN resulted in regressions values of 0.98 and above. This trend was consistent among all the subjects. As shown in Fig. 11, the regressions values after training the ANN for all the ten subjects were between 0.98 and 0.997 percent.

Fig. 11
figure 11

Overall regression values of all the trained ANN models for ten subjects

3.4 ANN error distribution

The relative errors for the trained ANN impedance magnitudes were determined using the averaged curves across 5 trials for relaxed, 10% MVC, and 20% MVC. The histogram plots, presented in Fig. 12, show the distribution of error. Each bin size has an interval of five percent error and each bin height is normalized to the probability of selecting a sample within the bin interval. The majority of data points for all ten subjects have zero or negligible relative errors resulting from the trained neural networks, especially for the 10% MVC and 20% MVC. It is evident that all the errors for the magnitude from these trials are within approximately 10% relative error. In addition, the relaxed muscle trials are within 15% relative error, except for Subject 1. For this subject, four samples have greater than 15% error because the average target impedance has a small magnitude (<1 Nm/rad). Hence, any small error was exaggerated for these particular samples. The absolute error between the relaxed target and output impedance for this subject is within ±3 Nm/rad.

Fig. 12
figure 12

Average relative error distribution for ANN impedance magnitudes of ten subjects with relaxed muscle, 10% MVC, and 20% MVC

4 Discussion

Modeling the dynamic impedance of the human ankle is an important step towards understanding how to properly design and control active ankle–foot prostheses. To perform walking or other ADL with performance comparable to humans, ankle–foot prostheses should behave similarly to the human ankle; thus, they rely on the estimation of the impedance values of the human ankle joint. In this study, we used the Anklebot to estimate the ankle impedance in EI for ten subjects across 150 trials. Each subject controlled their lower extremity muscle co-contractions to be relaxed, active with 10% MVC, or active with 20% MVC. The resulting impedance magnitude in each case monotonically increased, as expected, due to higher muscle activation levels (Figs. 6, 7). These results were used to verify that the ANN modeling approach could accurately model the human ankle impedance purely based on surface EMG experimental data, which is not trivial as muscle contraction modulates the ankle impedance in a nonlinear form. This study can provide initial impedance design parameters to control ankle–foot prostheses.

The impedance plots shown in Fig. 9 compare the impedance predicted by the ANN to the impedance estimated based on the ankle angles and torques. It is interesting to note that the ANN impedance predictions follow smoother curves, making them a suitable choice for impedance modulation in practical prosthetic control. The regression plots shown in Fig. 11 validate the developed ANN models. Since the regression values for training, validation, and testing datasets are between 0.98 and 0.997, the models can predict new impedance values from the test dataset that were not used during training. This also confirms that the developed network did not over fit the data. In addition to the regressions, the relative errors of the impedances, shown in the histogram plots of Fig. 12, are less than 15% for nine out of ten subjects. To reduce these errors further, a larger dataset could be used with more levels of muscle activations. For all the subjects, the best ANN performances were derived with less than 15 iterations (epochs), pointing to a quick convergence of the mse between the target and output impedance values.

One difference between the neural network design used in previous work (Dallali et al. 2017) was that the target impedance matrices were modified to use the real and imaginary components of the impedance, as opposed to the magnitude and phase. This approach proved to be more accurate and allowed for a faster convergence during ANN training. Across ten subjects, the minimum regression value between the target and output impedance improved from 0.955 to 0.98, while the maximum regression also improved from 0.995 to 0.997. One possibility for this difference is that the real and imaginary components provided a smaller range of values, resulting in better neural network performance.

In addition, the impedance frequency range used to train the neural networks was selected to be less than the break frequency, where the stiffness properties of the ankle were dominant. Across ten subjects, the estimated ankle stiffness for the three muscle levels were between the average minimum and maximum magnitudes of 2.2 and 35.0 Nm/rad, respectively. This range is for the ankle under a non-loaded and seated condition, and is expected to be less than the stiffness range for standing or walking conditions. Furthermore, it is interesting to note that the average phase across ten subjects ranged between 4.9° and 45.2°, as shown in Fig. 8. Since the phase does not remain constant, this knowledge could be important towards future work in designing prostheses with transverse plane control.

Few groups have studied the effects of adding a torsional spring adapter to a transtibial prosthesis to reduce the amount of shear stress added to the socket. Pew and Klute (2017) and Su et al. (2010) both determined that a torsional spring with a stiffness between the ranges of 17.2–52.1 Nm/rad could significantly reduce the forces applied to the socket and provide more comfort to an amputee. While these contributions provide insight towards the minimum and maximum stiffness requirements for a torsional spring adapter, these studies did not determine the ankle dynamic properties as function of changing muscle activity. To the authors’ knowledge, no other group has determined the relationship between muscle activity and the impedance of the ankle in the transverse plane. This study provides the framework towards applying this method to both standing and walking scenarios in the future studies.

To further develop this work towards standing and walking scenarios, the following concepts need to be considered. First, as shown in Figs. 7 and 8 the impedance determined at each muscle activation level varied among subjects. Future work could consider creating a more versatile ANN model, containing the impedance and EMG data from multiple subjects. New subjects could then use the model to determine the ankle impedance based on their EMG data, without having to retrain the ANN. In addition, the use of surface EMG may pose challenges such as variation in the signals, caused by muscle fatigue or sensor placement. To expand this method to standing or walking, real-time control developments must be able to interpret the EMG signal appropriately so that the impedance of the ankle–foot prosthesis can adapt to different conditions. The user should be able to improve and adjust the ankle–foot prosthesis stiffness by training the ANN model using the EMG signals from their muscles. The machine learning methods are known to improve as more data are used in training and real-time adaptation can lead to further improvements in the ANN impedance prediction quality.

5 Conclusion

This paper addressed the problem of quantifying the human ankle impedance in the transverse plane. A recently proposed approach based on artificial neural network was used to estimate the complex relationship between the rms of surface EMG signals of the lower extremity muscles and the impedance of the ankle in the transverse plane (external–internal DOF). Quantification of impedance in the transverse plane has an immediate impact on natural impedance control of ankle–foot prosthesis with an active EI DOF that can reduce the shear stress on the amputee’s socket and, as a result, reduce the secondary injuries caused the large amounts of shear forces.

Ten subjects participated in the tests while seated. The Anklebot was used to apply stochastic external perturbations to the ankle while measuring its position and torque. The ankle impedance in the external-internal DOF was estimated using a stochastic system identification. The resulting estimated impedance was used as a target for the ANN training to reconstruct the impedance values without requiring the position or the torque data of the ankle. The estimation of the ankle impedance based on EMG reading was within 15% relative error (±5 Nm/rad) when compared to the stochastic impedance estimation for nine out of ten subjects. These results showed a promising research direction for use of neural networks.

In future work, the use of human ankle position data and the surface EMG signals will be studied to investigate potential improvements for predicting the ankle impedance during activities such as standing and walking. These estimated ankle impedances will be used to design and control future variable ankle–foot prostheses for transtibial amputees.