The effect of dynamic prosthetic alignment on the transtibial gait: Analyzing with Opensim

After amputation, tting of the prosthesis in the adaptation and gait of an individual is crucial. However, this known dynamic alignment process is subjective on the part of the professional who makes said adjustment, compromising the stability of the individual. Therefore, a kinematic model to analyze the effects of dynamic alignment during the transtibial amputees gait in the sagittal plane using Opensim was developed. For this group, the socket position (Flexion and Extension, Abduction and Adduction) and the movements of prosthetic foot (Plantarexion and Dorsiexion, Inversion and Eversion) were analyzed. In opensim, the “osim” pilot was amputated incorporating a transtibial prosthesis that was previously modeled in Solid work, with a Matlab script the variation of the position of the prosthesis using inverse kinematics was simulated, results were validated on a subject with wireless sensors for the measurement. The model showed that acceptable gait patterns are found in positive variations between 2 ° and 6° for the socket and 2 ° for the prosthetic foot.


Introduction
Lower limb amputation is a problem that affects the world's population and in particular Colombia.
According to the Presidential Program for Comprehensive Mine Action (PPAICMA) between January 1990 and July 2020, 11.960 antipersonnel mine victims were reported [1]. This has made Colombia the third country with the highest number of antipersonnel mine victims during the last 15 years after Cambodia and Afghanistan. These gures have increased the number of investigations in the design of prostheses and new components; however, the adaptation of prosthetics remains subjective due to the particularities of everyone.
Although the patients are cared for by professionals, they only have their experience when performing the dynamic alignment of the prosthesis, changing the position of the components over and over again to obtain an adequate gait pattern [2]- [7]. As a result, the alignment varies from specialist to specialist [8], [9]. Several clinical studies have introduced some erroneous alignments [10] in order to assess the effects on gait [3], [11]- [14]. However, these have been limited by compromising patient stability. In this research, a kinematic model is developed to predict deviations of gait in the sagittal plane when the position of the components of the prosthesis (socket and foot) is modi ed, using tools like Matlab® and Opensim.
Although, the literature presents different models of normal gait [15], [16], pathological gait [17] and some of the prosthetic gait, none performs an analysis of the gait of the transtibial amputee versus dynamic alignment. The results are presented for all cases of misalignment studied. There, it is shown the kinematics in the sagittal plane, as well as the analysis by cyclograms.

Methods
The methodology in this study includes a skeletal model in Opensim (*.osim), which is later amputated through Paraview software; for the analysis, it was modelled a transtibial prosthesis in Solidwork® [18] retaining the parameters of a subject case study [19], [20], in this case a prosthesis with a dynamic foot. The model scaled to the anthropometric characteristics of the subject has been fed by the measurements of motion capture the equipment of Technaid®, equipment composed by inertial sensors that act as markers of the model. From the input information the inverse kinematics of OpenSim® was obtained, Fig. 1. This study was approved for Bioethical Committee of Universidad Distrital Francisco José de Caldas, Bogotá, Colombia.
Since only position variations were made for the subject in the socket, for the analysis of the de-alignment by foot effects a neural network was trained, to establish the effects on the gait. Taking into account that whenever a variation in the alignment of the prosthesis was required, it was necessary to modify the * .osim model. In addition, a script in MATLAB® to automatically generate the model was implemented.

Amputation model in Paraview
Given the characteristics of individual unilateral transtibial amputee, it is essential to perform the model of amputation, tibia and bula. For this purpose, it is important to emphasize that each part of the body is de ned in Opensim® as a * .vpt le. Each bodypart was constructed as a mesh of nite elements, which give the proper geometry; in this case, the cut considered the amputation of the individual under study (13.8 cm), since this occurs in the rst third of the knee.

Position of the markers
For the acquisition of the trajectories of the gait it was used Technaid® system. This method is composed by inertial sensors that can measure the position in angles in the three planes. For this study, the markers of the test equipment were located: chest, thighs, tibia and foot (in the case of the prosthesis, it will be in the equivalent physical part). The sensor that measures the groin is taken as a reference; the sensors are accelerometers and measure the angles in the frontal view, sagittal and coronal, on themselves. Once the data capture session is performed, the data is imported through a routine in the Matlab® program, which converts the angles measured by the equipment into vector coordinates with a canonical basis. Each vector has a different origin, an angle determined by the equipment and a unit value quantity; these prede ned values create an animated movement of the two lower extremities, in which the trajectory of the vectors are based on the model of an inverted pendulum.
For the construction of reference, these systems were xed at the end of each section of the lower limb, however, z=0 it was assumed in the frontal view and x=0 in the sagittal view. To observe the behaviour of the gait in these planes and to realize a threedimensional view as a vectorial sum, this is made between the two planes.
The Teta θ and Cita angles mentioned in the different origins of the coordinate systems are provided by a ".capa" le (which is provided by the Technaid® equipment). These angles are temporarily stored in Matlab® by creating numeric arrays, whose header name is the part of the body on which the sensor made measurements. The array is decomposed into lists, which have a value in the vector components, at the end each array row becomes a frame describing the movement of a segment of the animation. That is, Matlab® takes 12 vectors of the le ".capa", and each source assigns two values corresponding to θ and angles, in order to carry out the transformation of coordinates and draw a line between the origins according to the calculations made (Fig. 2).

Simulation of the gait in Matlab®
A virtual representation of the human gait was realized from the interpolation of the articular coordinates, the lines drawn from the calculated coordinates are plotted on the planes. To completely traverse the vectors, a number of iterations is performed, and it is also determined by the number of frames provided by the file ".capa", the time between erasures is determined by (8). Finally, to combine the motion in the 3D (Fig. 3), then a vector sum is applied as shown in Eqs. (9),(10) [18], [19].

Inverse Kinematics
Kinematics is the study of systems that describes the motion of lines, points and objects without contemplating the forces and moments that produce that motion. kinematics studies trajectories to provide a description of the spatial position of bodies, also motion, velocity, and acceleration, and can represent them in mathematical expressions. In some kinematical analyses, such as inverse kinematics, mass and inertia properties are not needed. The objective of this technique is to facilitate identify the motion of a body to reach a speci c location, inverse kinematics equations nds the joint angles required of the model needed to place the body to that location. The experimental kinematics used by the inverse kinematics is based on an experimental marker position (Fig. 4)

Results
In the kinematic model, the effects of gait on the sagittal plane were analyzed when the prosthesis was subjected to different positions, from -10 ° to 10 ° in steps of 2 °. These positions were modi ed in the sagittal and frontal planes, performing variations in the socket of: Abduction, Adduction, Flexion and Extension; in the foot were made variations in planti exion, dorsi exion, inversion and eversion. To validate the model, it was only possible to perform some of the variations achieved in the model, nding that the gait is acceptable only in some cases, as shown in Table I  The kinematics with standard deviations in the sagittal and coronal planes was plotted as a function of percentage of cycle gait (see Fig. 5). This plot represents the range of the angular joint in sagittal plane for hip, knee and ankle derived from the one amputee at clinically perceived optimal alignment. In this study, the amputee leg and sound leg were analyzed, for showing the impact in the sound leg.
At Figures 5 are showed the effects for each misalignment, at Table 2 the effects for each case, the results of the model gait were compared with the measurements.

Conclusion
The developed kinematic model allowed establishing gait sensitivity in predicting deviations in the sagittal plane, when the position of the prosthesis components (Lace and Foot) was modi ed, using tools such as Matlab® and Opensim®.
Taking into account that each time the position of the socket and the prosthetic foot is modi ed it is necessary to reassemble the model, a script was developed using the Matlab® xml_writeOSIM Program, to automatically create the structure of the model in Opensim, so that facilitates the analysis for each of the proposed misalignments.
Given the modi cations in the position of the t; there are mechanisms of compensation of the individual in the leg not amputated to maintain the line of load in position so that it maintains the stability.
In general, it was found that given the reduced mobility of the prosthetic foot, the amputated side presents a lower range of mobility for all cases, implying that it is compensated with the non-amputated leg.
In order to analyze the kinematics of the gait with the different positions of the prosthesis, it was necessary to develop an algorithm of ascent to the hill, in order to synchronize the signals and thus to compare the results independently for each one of the legs; The algorithm shifts the signals by placing the largest amplitude and calculating the correlation between the signals, obtaining the best synchronization, so that the signals retain the same period the algorithm interpolates the signals, in case the samples of a running cycle Are different with respect to the signal to be compared.

Discussion
The articular movement of the lower limbs of the subjects studied was compared to the parameters of a prosthetic gait of an amputee to the subjects to whom the alignment variation was performed to analyze the effects in the sagittal plane.
In all cases, it was veri ed that there is greater variability in the amputated side compared to the healthy side, the difference of the greater one appearing in the ankle, also found that the period of double support is greater in the amputee than in the normal gait, which can be associated with the increase of required energy consumption to support body weight in one foot. This suggests that the subjects do not perform the total load on the transtibial amputee, which agrees with studies such as those of Perry and Hart in which amputated member alters the biomechanical performance in compensatory form. In the case of the amputee with test prosthesis may be due to an inappropriate adaptation to it.
When showing in the sagittal plane analysis of the exion-extension of the different segments of the lower limb, the alignment of the prosthesis and the effects on gait for each subject is shown Figure 1 Methodology for Model in Opensim Gait of transtibial prosthetic