Full text
Grau en Enginyeria en Tecnologies Industrials (GETI) Modelling, simulation and optimization of a robotic assistive device for patients with spinal cord injury Bachelor’s Thesis July 1, 2022 Author: Pol Salat Directors: Josep Maria Font Llagunes Massimo Cenciarini Convocatory: June 2022 Escola Tècnica Superior d’Enginyeria Industrial de Barcelona
Modelling, simulation and optimization of an assistive device for SCI patients pag. 1 Abstract Robotic gait assistance devicescan help the rehabilitation and quality of life of the patients who suffer from spinal cord injury or other neuromuscular disease. The main objective of this bachelor’s thesis in Industrial Technologies Engineering is focused on the obtention of a model of a lower limb exoskeleton and the modelling of the device-user interface contact model in OpenSim which is an open source software developed by the Stanford University. With this model, the final goal pursued is to make predictive simulations of the motion with a biomechanical model of a patient. The results of this thesis can be used to study mechanics involved in a motion of a patient wearing this type of exoskeleton. This thesis contains a relevant background on the topic followed by a practical part where the modelling, simulation and optimization of an exoskeleton is made. The first step is to create a biomechanical model of an exoskeleton using OpenSim. The human body is modelled with a multibody system using rigid bodies. A simple threedimensional model of a human body formed by 12 bodies simulated as a HAT (head, arms and trunk) is used to add a two bodies exoskeleton. There are three different approaches studied to add this exoskeleton to the human body. Thus, three biomechanical models are created and studied. Secondly, five motions are captured in the UPC Biomechanics Laboratory in order to perform the kinematic and dynamic simulations in OpenSim. The final practical step is to use the captured motion to study the behaviour of the exoskeleton in the laboratory, and then adjust the mechanical parameters set when modelling the device-user contact interface. Adjusting the mechanical parameters of the bushing forces is not evident. Thus, a methodology to find them is created. Finally, the model found of the exoskeleton is studied dynamically. Predictive simulations are performed with it, where the motion of the exoskeleton is simulated when the motion of a person wearing it is prescribed. The results of this thesis are satisfactory because a fully functional model of an exoskeleton validated using real data captured from a real motion. The kinematic and dynamic analysis seen in this project show positive results and aim to be a precedent for future studies in this research. Nevertheless, there is still future work to be done testing the exoskeleton on more patients and analysing the results in a wider variety of tests. Furthermore, further research on this topic can be done in some areas such as automation of the process of calibrating the mechanical properties of the bushing forces, so more types of exoskeletons can be used.
pag. 2 Bachelor’s thesis
Modelling, simulation and optimization of an assistive device for SCI patients pag. 3 Contents 1 Introduction 9 1.1 Motivation..................................... 9 1.2 Objectives ..................................... 9 2 Background 11 2.1 Spinal cord injury and robotic gait assistance . . . . . . . . . . . . . . . . . 11 2.1.1 Pathophysiology ............................. 11 2.1.2 Injury levels and classification . . . . . . . . . . . . . . . . . . . . . 12 2.1.3 Treatment ................................. 12 2.1.4 Orthosis used in the thesis . . . . . . . . . . . . . . . . . . . . . . . . 13 2.2 Mechanicsoftheknee .............................. 15 2.2.1 Bones.................................... 15 2.2.2 Muscles .................................. 15 2.2.3 Kinematics of the knee . . . . . . . . . . . . . . . . . . . . . . . . . . 16 2.3 StateoftheArt................................... 17 3 Human Body and Device-User Interface Model 19 3.1 OpenSim...................................... 19 3.2 Biomechanicalmodel............................... 19 3.2.1 Bodies ................................... 19 3.2.2 Joints.................................... 20 3.2.3 Generalized Coordinates . . . . . . . . . . . . . . . . . . . . . . . . . 21 3.2.4 Forces ................................... 21 3.3 SkeletalModels .................................. 22 3.3.1 UnassistedModel............................. 22 3.3.2 AssistedModel.............................. 26 4 Experimental data collection 31 4.1 Laboratoryequipment .............................. 31 4.1.1 Softwareused............................... 32 4.2 Laboratoryset................................... 32 4.3 Datacollection................................... 33 4.3.1 Dataprocessing.............................. 34 4.4 Markersprotocol ................................. 34 4.4.1 Markers protocol used . . . . . . . . . . . . . . . . . . . . . . . . . . 36 5 Kinematic and Dynamic analysis of the simulations 39 5.1 Scaling ....................................... 39 5.1.1 Scalingprocess .............................. 39 5.2 InverseKinematics ................................ 40 5.2.1 Resolution with OpenSim . . . . . . . . . . . . . . . . . . . . . . . . 41 5.3 ForwardDynamics ................................ 41 5.3.1 Resolution with OpenSim . . . . . . . . . . . . . . . . . . . . . . . . 42 5.3.2 Prescribing the motion . . . . . . . . . . . . . . . . . . . . . . . . . . 42 5.3.3 Methodology to determinate the mechanic parameters of the bushingforces ................................. 43 5.4 InverseDynamics................................. 46
pag. 4 Bachelor’s thesis 5.4.1 Joint torques and residual forces . . . . . . . . . . . . . . . . . . . . 46 5.4.2 Resolution with OpenSim . . . . . . . . . . . . . . . . . . . . . . . . 47 6 Results and Discussion 49 6.1 Kinematicanalysis ................................ 49 6.1.1 Motion without exoskeleton . . . . . . . . . . . . . . . . . . . . . . . 49 6.1.2 Motion with exoskeleton . . . . . . . . . . . . . . . . . . . . . . . . . 52 6.2 Optimization of the bushing forces parameters using Forward dynamics . 57 6.2.1 Modelling the lower bushing force using the third approach of the biomechanical model discussed in paragraph 3.3.2 . . . . . . . . . . 57 6.2.2 Modelling the upper bushing force using the first and second approach of the biomechanical model discussed in paragraph 3.3.2 . 63 6.2.3 Refining the bushing force parameters . . . . . . . . . . . . . . . . . 68 6.3 Dynamicanalysis................................. 70 6.3.1 WalkExperiment............................. 71 6.3.2 Squatexperiment............................. 74 7 Simulations 77 7.1 Predicting a walking motion with an exoskeleton . . . . . . . . . . . . . . . 77 7.2 Predicting a squat with an exoskeleton . . . . . . . . . . . . . . . . . . . . . 79 8 Project impact and implementation 81 8.1 Environmentalimpact .............................. 81 8.2 Workplan ..................................... 81 8.3 Economic cost of the project . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 Conclusions 85 Acknowledgements 87 Bibliography 89
Modelling, simulation and optimization of an assistive device for SCI patients pag. 5 List of Figures 1 Picture of the extended leg of a human subject wearing the exoskeleton usedforthisthesis................................. 13 2 Two perspectives of the computer model of the exoskeleton used in this project. Captures obtained from SolidWorks. . . . . . . . . . . . . . . . . . 14 3 Sagittal, frontal and transversal views of the knee. Picture obtained from [17]......................................... 16 4 Evolution of the centre of rotation in respect with the angle of flexion of the knee. Extracted from [16] ............................ 16 5 Graphic illustration of the concept of bushing forces. Picture found in [27] 21 6 Left: Capture of the Unassisted model shown in the OpenSim GUI. Right: Capture of the Assisted model shown in the OpenSim GUI . . . . . . . . . 23 7 Left: Topology view of the unassisted model, obtained by OpenSim. Right: Topology view of the assisted model when the exoskeleton is connected with the femur, obtained by OpenSim. . . . . . . . . . . . . . . . . . . . . . 25 8 Application point of the two introduced bushing forces. Capture made by OpenSim....................................... 30 9 Left: Infrared camera model used to record the motion of the markers. Right: Example of a spherical reflective marker such as the ones used in thelab. ....................................... 31 10 Picture of the model of the plates used in the lab . . . . . . . . . . . . . . . 32 11 Two views of the lab where the experiments are made . . . . . . . . . . . . 33 12 Diagram showing the files needed to perform a kinematic and dynamic analysisinOpenSim ............................... 35 13 Marker’s protocol for the unassisted model . . . . . . . . . . . . . . . . . . 36 14 Markers protocol used for the assisted model . . . . . . . . . . . . . . . . . 38 15 Detailed view of the markers placed in the exoskeleton . . . . . . . . . . . 38 16 Scheme of files involved in the scaling process where the inputs are a model (.osim), a motion file (.trc) of the subject wearing the markers and a setting file (.xml) which is not needed if the settings are set manually . . . . . . . 39 17 Left: The skeletal model before (Left) and after (Right) the scaling process. Right: The locations of the markers in the exoskeleton before (Left) and after (Right) the scaling process. Extracted from [33] ............ 40 18 Scheme of files involved in the inverse kinematics process, where there are three input and one output. The three inputs are a scaled model (.osim), the desired markers motion (.trc) and a setup file (.xml) that is only necessary when the settings are not set manually. The output file is the result motion (.mot) with the evolution of the generalized coordinates. Extracted from [29]. ..................................... 41 19 Scheme of the files needed in the forward dynamics process, where there arefour inputsand one output. Thethree inputsare a scaledmodel(.osim), a foot-ground forces registration (.xml), a time histories of the model controls (.xml) and a setup file which is only necessary if the configurations are not set up manually. Finally, for the output file, the user can specify which types of analysis to do from the ones specified in [35]. Extracted from [34]. ..................................... 42
pag. 6 Bachelor’s thesis 20 Scheme of the files involved in the inverse dynamics process, where there are four inputs and one output. The four inputs are a scaled model (.osim), a foot-ground registration (.xml), the result of an inverse kinematics analysis (.mot) and a setup file which is only necessary if the configurations are not set up manually. Finally, the output of the inverse dynamics process is a net joint torques and residual wrench calculated in the experiment. Extracted from [37]. ............................... 47 21 Angle value variation with respect to time for the walking experiment . . 49 22 Analysis of the phases of a normal gait cycle. Extracted from [38]. . . . . . 50 23 Angular velocity variation with respect to time for the walking experiment 51 24 Angle value variation with respect to time for the squat experiment . . . . 51 25 Angular velocity variation with time for the squat experiment . . . . . . . 52 26 Angle variation with respect to time for the walking experiment . . . . . . 53 27 Angular speed variation with respect to time for the walking experiment . 54 28 Angle variation with respect to time for the squat experiment . . . . . . . 55 29 Angular speed variation with respect to time for the squat experiment . . 56 30 Angle variation with respect to time for the flexing of the left leg experiment 56 31 Simulations carried out with a logarithmic progression for the value of k. 57 32 Left: Forces produced by the weld joint. Right: Torques produced by the weldjoint...................................... 59 33 Left: Forces produced by the bushing forces when k=1. Right: Torques produced by the bushing forces when k=1. . . . . . . . . . . . . . . . . . . 60 34 Left: Forces produced by the bushing forces when k=10. Right: Torques produced by the bushing forces when k=10 . . . . . . . . . . . . . . . . . . 60 35 Left: Forces produced by the bushing forces when k=100. Right: Torques produced by the bushing forces when k=100 . . . . . . . . . . . . . . . . . 61 36 Simulationsdonefor ten equidistantkvaluesbetweenk=1 andk=10where the orthosis left knee angle for each simulation is compared to the one found in the inverse kinematics process . . . . . . . . . . . . . . . . . . . . 62 37 Plot of the MSE calculated for each simulation for ten equidistant k values betweenk=1andk=10.............................. 62 38 Plot of the simulated value for the left orthosis knee for different k values following a logarithmic progression compared to the plot found for the orthosis left knee in the inverse kinematics process . . . . . . . . . . . . . . . 64 39 Simulations done for ten equidistant k values between k=10 and k=100 where the orthosis left knee angle for each simulation is compared to the one found in the inverse kinematics process . . . . . . . . . . . . . . . . . . 65 40 Plot of the MSE calculated for each simulation for ten equidistant k values betweenk=10andk=100 ............................ 66 41 Left: Time evolution of the vertical force produced by the upper bushing force for each simulation done for ten equidistant k values between k=10 and k=100. Right: Mean value of the vertical forces produced by the upper bushing force for each simulation done for ten equidistant k values between k=10andk=100. ................................. 67 42 Plot of the relative position of the upper part of the exoskeleton with the femur for each simulation done for ten equidistant k values between k=10 andk=100...................................... 68 43 Plot of the relative position of the upper part of the exoskeleton with the femur for each simulation described in table 16 . . . . . . . . . . . . . . . . 70
Modelling, simulation and optimization of an assistive device for SCI patients pag. 7 44 Left: Complete view of the time evolution of the residual forces resulting from the inverse dynamics analysis for the model where the exoskeleton is linked with the femur with a free joint. Right: Time evolution of the residual forces resulting from the inverse dynamics analysis on the time period when the ground reactions are measured for the model where the exoskeleton is linked with the femur with a free joint. . . . . . . . . . . . . 72 45 Left: Complete view of the time evolution of the residual torques resulting from the inverse dynamics analysis for the model where the exoskeleton is linked with the femur with a free joint. Right: Time evolution of the residual torques resulting from the inverse dynamics analysis on the time period when the ground reactions are measured for the model where the exoskeleton is linked with the femur with a free joint . . . . . . . . . . . . 72 46 Left: Complete view of the time evolution of the residual forces resulting from the inverse dynamics analysis for the model where the exoskeleton is linked with the ground with a free joint. Right: Time evolution of the residual forces resulting from the inverse dynamics analysis on the time period when the ground reactions are measured for the model where the exoskeleton is linked with the ground with a free joint. . . . . . . . . . . . 73 47 Left: Complete view of the time evolution of the residual torques resulting from the inverse dynamics analysis for the model where the exoskeleton is linked with the ground with a free joint. Right: Time evolution of the residual torques resulting from the inverse dynamics analysis on the time period when the ground reactions are measured for the model where the exoskeleton is linked with the ground with a free joint . . . . . . . . . . . . 73 48 Left knee and left orthosis knee torques produced in the walk simulation . 74 49 Left: Complete view of the time evolution of the residual forces resulting from the inverse dynamics analysis for the model where the exoskeleton is linked with the femur with a free joint. Right: Time evolution of the residual forces resulting from the inverse dynamics analysis on the time period when the ground reactions are measured for the model where the exoskeleton is linked with the femur with a free joint. . . . . . . . . . . . . 75 50 Left: Complete view of the time evolution of the residual torques resulting from the inverse dynamics analysis for the model where the exoskeleton is linked with the femur with a free joint. Right: Time evolution of the residual torques resulting from the inverse dynamics analysis on the time period when the ground reactions are measured for the model where the exoskeleton is linked with the femur with a free joint. . . . . . . . . . . . . 75 51 Left knee and left orthosis knee torques produced in the squat simulation 76 52 Left: Comparison of the trajectories of the angle value of the orthosis left knee and the left knee for the walk simulation. Right: Comparison of the angular velocity value of the orthosis left knee and the left knee for the walk simulation...................................... 77 53 Left: Bushing forces generated by the upper bushing force during the walk simulation. Right: Torques generated by the upper bushing forces during thewalksimulation. ............................... 78 54 Left: Bushing forces generated by the lower bushing force during the walk simulation. Right: Torques generated by the lower bushing forces during thewalksimulation. ............................... 78
pag. 14 Bachelor’s thesis Where there are some small differences with the model shown in Figure 1. The main two differences between the two models are that the orthosis thigh shown in Figure 1 is missing a box to hide the cables, and also that the design of the contact points have been changed. Although these changes can be easily appreciated when comparing the pictures, the dynamic behaviour is not affected by these changes. The physical properties of the different parts of the exoskeleton are shown in Table 1. The calculation of the Mass Centre and the Inertia of the bodies has been made considering a uniform density throughout the body. This hypothesis has been made for the sake of simplicity, with the assumption that the difference with the real value of these properties does not have any relevant impact in the model’s behaviour. Figure 2: Two perspectives of the computer model of the exoskeleton used in this project. Captures obtained from SolidWorks. Table 1: Physical properties of the upper and lower parts of the exoskeleton calculated using the SolidWorks model Part Mass (g) Mass Centre (mm) Inertia (g*mm^2) Orthosis Thigh + Motor 1172 (1,2; 52,15; 11,53) (15,3e5; 20,0; 14,8e5; 57,3e4; 10,0e4; 13,1e5) Orthosis Shank 717.2 (0.07; -143.37; -5.56) (13,9e6; 31,2e4; 13,9e6; -63,0e2; -17,4; 34,1e4)
Modelling, simulation and optimization of an assistive device for SCI patients pag. 15 The total mass of the exoskeleton is 1,8892 kg, which means that the weight of the exoskeleton is 18,533 N. As explained in the section 3.2, in order to include the graphics in the OpenSim visualizer, a Visualization Toolkit Polygonal Data files (VTP files) are needed. The conversion from a SolidWorks file to a Visualization Toolkit Polygonal Data file is done exporting directly the model from SolidWorks. There is a Pin Joint between the upper body and the lower body of the exoskeleton that will be later modelled by OpenSim. For this reason, the upper body and the lower body are converted separately into VTP files. To do this conversion, the origin must be placed in the rotation axis, which must be the z-axis. 2.2 Mechanics of the knee Since the thesis is related to an exoskeleton knee orthosis, it is important to describe and present the mechanics of this joint first. The knee is the largest joint in the human body. Its movement is mainly flexion-extension, and for the purpose of this project, it acts essentially as a hinge joint [13]. The movement of the knee comes after the femur and the tibia roll on each other. A sagittal, frontal and transverse views of the knee can be seen in Figure 3. 2.2.1 Bones The knee is connected to four different bones which are the femur, the tibia, the fibula and the patella. The femur is the longest bone in the body, and it’s located in the thigh. The patella also known as the ’knee cap’ is a small joint in the knee. The tibia is a large bone that connects the knee from the bottom. Finally, the fibula is a bone that runs along-side the tibia, but does not bear weight from the body [14]. 2.2.2 Muscles There are two main muscles involved in the knee. The quadriceps straightens the knee joint, whereas the hamstrings bend it. Furthermore, the gastrocnemius have an influence on the knee, even though its role in knee biomechanics and on the anterior cruciate ligament remains less clear when compared to hamstrings and quadriceps [15].
pag. 16 Bachelor’s thesis Figure 3: Sagittal, frontal and transversal views of the knee. Picture obtained from [17] For the sake of simplicity, the elements used in the simulation of the body will only be the femur and the tibia, which are the most important elements for this joint. 2.2.3 Kinematics of the knee In the biomechanical models made in this project, the knee is approximated as a tibiafemoral contact, neglecting all the other muscles and bones. The rotation of the tibia with respect to the femur comes with a translation that changes the centre of rotation of both bodies. The centre of rotation for positions 30ºand 60ºis shown in Figure 4. The centre of rotation of the tibia and the femur does not remain in the same position, instead, the centre of rotation has an evolution such as the one shown in Figure 4 [16]. Figure 4: Evolution of the centre of rotation in respect with the angle of flexion of the knee. Extracted from [16]
Modelling, simulation and optimization of an assistive device for SCI patients pag. 17 2.3 State of the Art Previous work have been made in this field trying to develop a model of an exoskeleton in OpenSim with a wide variety of different approaches when modelling external bodies such as exoskeletons. From the different works studied for this project, the projects detailed in the following lines will be used as a precedent for this thesis. M. Febrer developed her PhD thesis on "Optimal control prediction of assisted walking using torque-driven models" [1] where a biomechanical model of a person wearing a lower limb exoskeleton was developed in OpenSim. In order to do it, the different parts of the exoskeleton were placed in the tibia using a weld joint. This approach acts like the leg bones and the exoskeleton are welded, so no relative motion between bodies is introduced. A different approach was followed by both thesis from D. Coll [39] and M. Musso [40] in their thesis called "Simulation of the Assistance of an Exoskeleton on Lower Limbs Joints UsingOpenSim"and "SimulationHMI with OpenSim"respectively, where theyalso made a model of an exoskeleton but introducing the idea of "bushing forces" to simulate the real contact between the device and the human body. The differences between these approaches and the approach taken by M. Febrer is that the exoskeleton is no longer an extension of the leg, and it acts as a different solid. Theseapproaches in themodelling of an exoskeletoninOpenSimwill be furtherdiscussed in section 3 where a more detailed explanation will be given on how does OpenSim mechanical models work and how can an external device be joined to a biomechanical model of a person.
Modelling, simulation and optimization of an assistive device for SCI patients pag. 19 3 Human Body and Device-User Interface Model The main objective of this thesis is to develop a model of an exoskeleton in OpenSim. Before studying the behaviour of a person wearing an exoskeleton, it is necessary to develop a biomechanical model of a person in OpenSim including the exoskeleton. In this section, the steps to develop the model are described, as well as its components. 3.1 OpenSim "OpenSim is a freely available, user extensible software system that lets users develop models of musculoskeletal structures and create dynamic simulations of movement." [3] OpenSim was created by the Stamford university and the first version was released in 2007. OpenSimlets the usermake elaborate biomechanicalstudiesof walkingdynamics, studies of sports, analysis of joint loads, surgical procedures or, as it will be done in this thesis, design of medical devices. The version used for this project is OpenSim 4.2. OpenSim offers a Graphical User Interface (GUI) written in Java, which is friendly to interact with. However, the biggest part of the study will be done with the OpenSim interface in Matlab. MATLAB is a programming platform designed specifically for engineers and scientists to analyse and design systems and products that transform our world [32]. 3.2 Biomechanical model The human body in this project is modelled in OpenSim as a rigid body linked segment model. It contains bodies, joints and generalized coordinates. To simplify the study, the motion is considered to be in a skeletal level. Thus, joint torques are considered but muscles forces are not. In this section, the bodies, joints, coordinates and forces detailed by OpenSim are studied and analysed using the OpenSim API [18]. 3.2.1 Bodies OpenSim defines the bodies as a physical frame with associated inertia specified by its mass, centre of mass, and its moment of inertia tensor about the centre of mass. Thus, if a new body is added in the model, these parameters must be specified. In order to add a new body to the model, the following parameters need to be set: 1. Name 2. Mass: Mass of the object in kg. 3. Mass Center: Three-dimensional vector describing the position of the mass centre in meters. 4. Inertia: Six-dimensional vector (I_xx I_yy I_zz I_xy I_xz I_yz) describing the inertia matrix in SI units. Furthermore, to visualize the body geometry in the OpenSim GUI, it is also necessary
pag. 20 Bachelor’s thesis to define a mesh file. A common way to define it and the one used in this project is by exporting an object from SolidWorks as a Visualization Toolkit Polygonal Data file (VTP file). 3.2.2 Joints OpenSim defines the joints as a model component which connects two physical frames together and specifies their relative permissible motion as described in internal coordinates. Each joint specifies two frames, which the joint spans. The relative motion between the bodies is defined by individual joints, which specify the permissible kinematics between a child frame with respect to a parent frame. There exist a wide variety of joints that can be used, giving a big number of relative motion options. During this project, the only joints involved are: 1. Pin Joint: A Pin Joint provides one degree of freedom about the common Z-axis of the joint (not body) frames in the parent and child body. If the desired axis of rotation differs from the z-axis, a rotation can be done [19]. 2. Free Joint: A Free Joint allows unrestricted motion with three rotations and three translations between the child frame and the parent frame. Rotations are modelled using quaternions with no singularities, while the translational generalized coordinates are XYZ translations along the parent axis. Generalized speeds are equal to the computed angular velocities (u =ω), not a differentiation of position (u =q) [20]. 3. Weld Joint: Weld Joints are the opposite to a Free Joint. There is no relative motion of bodies joined by a weld. Weld joints are often used to create composite bodies from smaller, simpler bodies. It is also possible to get the reaction forces at the weld in the usual manner [21]. 4. Custom Joint: Custom Joints offer a generic joint representation, which can be used to model both conventional and more complex biomechanical joints. The behaviour of a custom joint is specified by its Spatial Transform. A Spatial Transform is composed of 6 Transform Axes (3 rotations and 3 translations) that define the spatial position of Child in Parent as a function of coordinates. Each transform axis has a function of joint coordinates that describes the motion about or along the transform axis. The order of the spatial transform is fixed, with rotations first followed by translations. Subsequently, coupled motion is handled by transform axis functions that depend on the same coordinate(s) [22]. Custom Joints are the most commonly used joints between bodies in the examples of OpenSim skeletal models because they are the more general ones, so they give the model a wide range of possibilities. However, when introducing new joints in the model, the most easy procedure is to use already specified joints such the first third ones explained. Thus, to define the joints involving the exoskeleton, custom joints are not used.
Modelling, simulation and optimization of an assistive device for SCI patients pag. 21 3.2.3 Generalized Coordinates With the bodies and the joints specified, in order to have a motion, the model must have the generalized coordinates specified. The Generalized Coordinates are the independent variables that describe the model configuration with respect to a reference. When the number of degrees of freedom of a system and the number of generalized coordinates are the same, the system is holonomic. A holonomic system is also defined as a system in which the constraints are such that the original coordinates can be expressed in terms of independent coordinates and possibly also the time [23]. 3.2.4 Forces Forces can be either assigned to bodies or generalized coordinates during a simulation. There exists a wide variety of forces that can be applied to a OpenSim model [24]. However, only two types of Forces are introduced for this study: 1. Forces can be defined by an actuator that requires a generic external input to generate force [25]. This way a prescribed motion can be given to a certain generalized coordinate. Muscles are one clear example of a type of actuator. 2. Bushing forces: OpenSim defines a Bushing Force as the force proportional to the deviation of two frames. One can think of the bushing as being composed of 3 linear and 3 torsional spring-dampers, which act along or about the bushing frames. Orientations are measured as x-y-z body-fixed Euler rotations, which are treated as though they were uncoupled. Damping is proportional to the deflection rate of change, which is not the angular velocity between the two frames. That makes this bushing model suitable only for slightly small relative orientation deviations between the frames [26]. These forces are the ones used to simulate the device-user contact model. A diagram showing the behaviour of these forces is show in Figure 5. Figure 5: Graphic illustration of the concept of bushing forces. Picture found in [27]
pag. 22 Bachelor’s thesis In order to define a bushing force in OpenSim as a joint linking two bodies, the following parameters are needed: (a) Body name (b) Frame 1 (c) Location in Frame 1: A spatial transformation that gives a translation and a rotation from the origin of the frame 1. This changes the application point of the bushing forces inside the "parent body". (d) Frame 2 (e) Location in Frame 2: A spatial transformation that gives a translation and a rotation from the origin of the frame 2. This changes the application point of the bushing forces inside the "child body". (f) Translational Stiffness: Three dimensional vector that specifies the translational stiffness in SI units. (g) Rotational Stiffness: Three dimensional vector that specifies the rotational stiffness in SI units. (h) Translational Damping: Three dimensional vector that specifies the translational damping in SI units. (i) Rotational Damping: Three dimensional vector that specifies the rotational damping in SI units. The rotational and translational stiffness constants and the rotational and translational damping constants give 12 variables that determinate the behaviour of the bushing forces. 3.3 Skeletal Models Two types of models have been developed for this thesis. In the following sections, the models used in this thesis are detailed. The description of the used models include an explanation on their bodies, joints, coordinates and forces. The models developed for this project are shown in Figure 6, and they are classified as unassisted and assisted model. The assisted model has an exoskeleton in the left knee, and the unassisted model consists of a simplified skeleton without any external device. Both models are three-dimensional. 3.3.1 Unassisted Model The unassisted model seen in Figure 6 is a skeleton model without any external device. It is used for simulations where the exoskeleton is not included. This model consists of a holonomic system with 12 bodies and 12 joints that give 23 degrees of freedom. More details are included in the following sections.
Modelling, simulation and optimization of an assistive device for SCI patients pag. 23 Figure 6: Left: Capture of the Unassisted model shown in the OpenSim GUI. Right: Capture of the Assisted model shown in the OpenSim GUI Bodies The unassisted model contains the 12 bodies described in table 2. Although the ground is also considered as a body in this study, it is not part of the model. The object of study of this thesis is the lower trunk of the body. Thus, the device used in this project is a lower limb exoskeleton. The arms are simplified and the upper part of the body is simulated as a HAT (head, arms and trunk). In order to make this simplification, the physical properties of the trunk have been changed to include the ones from the arms.
pag. 30 Bachelor’s thesis found in section 3.2.4. The bushing forces developed by OpenSim are defined with the hypothesis that the relative orientation deviation between the frames is relatively small. This hypothesis is valid for this project’s model because the relative motion between the orthosis and the leg is almost non-existing. Two bushing forces have been defined in the orthosis leg contact points for the first two approaches discussed in paragraph 3.3.2. In the third approach, only one contact force has been introduced. It is important to notice that the application point of the bushing force must be the same in both frames. In order to find the exact coordinates of a specific contact point from different reference frames (frame 1 and frame 2) two markers are added to the OpenSim GUI (Figure 8). This way both contact forces can be aligned, and the force is applied in the same point in both cases. Figure 8: Application point of the two introduced bushing forces. Capture made by Open- Sim. When defining the bushing forces, the translational and rotational stiffness values as well as the translational and rotational damping values have to be set in the three dimensions. Thus, a total of 12 parameters have to be set for each contact. For this reason, in order to define the stiffness and damping parameters, some method is needed, which is specified in section 5.3.3.
Modelling, simulation and optimization of an assistive device for SCI patients pag. 31 4 Experimental data collection After creating the biomechanical models and implementing a prototype of an exoskeleton in a human body, the behaviour of it need to be tested with a motion. For this reason, different motions are recorded in the laboratory. The procedure to obtain these data files is described in this section. Following the steps described by E. Bosch [30], the exoskeleton described in Figure 1 has been placed to a healthy patient to study the motion of the skeletal model with an assistance device. In order to measure this motion, the laboratory has been set and all the devices have been calibrated as explained in the following sections. 4.1 Laboratory equipment The experimental data needed for this project has been captured at the Universitat Politecnica de Catalunya (UPC) in the Biomechanics Laboratory. This laboratory is found in the Research Centre for Biomedical Engineering (CREB) which is placed in the 4th floor of the Barcelona School of Industrial Engineering (ETSEIB). The captured experimental data consists of markers trajectories, and the ground forces and torques reactions. Marker’s trajectories have been captured using passive reflective markers. The BiomechanicsLaboratoryownsa OptiT rackT M MotionCaptureSystemwhich consistsof V100:R2 cameras and a set of reflective markers. The motion system detects the spatial position of the reflective markers using the emission of infrared light reflected on the study markers. The reflective markers consist of little spherical objects that can be placed in interesting points of study in the model, covered with a reflective material. The information of the motion capture lets the system have a three-dimensional simulation of the marker’s position at each instant of time inside the work volume. This means that any motion recorded with this motion system must remain inside the studied volume. Surface marker motion has been recorded at 100 Hz (100 images per second) using 12 cameras placed symmetrically in the laboratory. An image of the reflectors and the camera used can be seen in Figure 9. Figure 9: Left: Infrared camera model used to record the motion of the markers. Right: Example of a spherical reflective marker such as the ones used in the lab.
pag. 32 Bachelor’s thesis Ground reactions have been measured by two plates AMTI Accugait located in the centre of the working volume. Each plate measures the three reaction forces from the ground to the studied model. It also measures the torque reactions in the centre point of the plate. The ground reactions, as well as the motion study, have been captured at a frequency of 100 Hz. An image of the device used can be seen in Figure 10. Figure 10: Picture of the model of the plates used in the lab 4.1.1 Software used In order to synchronize the cameras and the ground reactions and capture the motion and the ground reactions, two programs have been used. On the one hand, to capture the motion with the cameras placed in the lab, the Biomechanical Laboratory uses the program called Motive OptiTrack. Motive processes OptiTrack camera data to deliver global 3D positions, marker IDs, rotational data (with respect to the object’s local reference) and accurate skeletal tracking [31]. On the other hand, the application to control the AMTI Accugait devices and synchronize them with the motion tracking is MATLAB. 4.2 Laboratory set The marker’s motion can only be described inside the working volume. This means that one has to be very careful when placing the cameras because the camera placement will determine how big the working volume is. The biomechanics laboratory used for the motion capture has 12 cameras placed in the 4 walls of the laboratory as shown in Figure 11. When the motion capture is done, no reflective objects can be seen inside the camera’s domain and the lights have to be turned on. This way the camera efficiency increases and the marker’s tracking is done with better success. Apart from the camera placement, the placement of the ground plates is also important to be located in a visible zone inside the working volume. As seen in Figure 11, the ground reaction plates are located in the middle of the laboratory, and they are placed together. This way, when doing the experiment, the two feet can be placed one in each plate. Finally, the Laboratory also has a desktop with a computer that controls and synchronize all the devices with the programs Matlab and Motive specified in the previous section.
Modelling, simulation and optimization of an assistive device for SCI patients pag. 33 Figure 11: Two views of the lab where the experiments are made Once all the devices have been placed in the lab, the devices must be calibrated to have a movement capture. As mentioned before, the first step is to make sure that there are no light sources in the room and there are no reflective objects inside the camera’s domain. For this reason, it is important that the computer desktop is outside the working volume. During the calibrating procedure, the system computes the position and orientations of the cameras involved. As explained in [31], the steps to be followed in the calibrating procedure are: 1. Prepare and optimize the capture volume for setting up a motion capture system. 2. Apply masks to ignore existing reflections in the camera view. Here, also make sure the calibration tools are hidden from the camera views. 3. Collect calibration samples through the wanding process. 4. Review the wanding result and apply calibration. 5. Set the ground plane to complete the system calibration. Any change in the camera’s position must be followed with a recalibration of the system, so the cameras must remain in the same orientation and position after a calibration. 4.3 Data collection Once all the lab devices are ready and the marker’s placement has been made on the subject, the motion captures are made. In this project, four different captures has been made with both the assisted model and the unassisted model described in section 3.3. For the motion captures, a healthy subject has been chosen to make the captures referring to both models. The subject is a 22 years old man of 78 kg of mass and 191 cm of height. The captures taken are described in the following lines:
pag. 34 Bachelor’s thesis 1. Walk without exoskeleton: The subject with the markers’ protocol seen in Figure 13 starts from a motionless position outside the ground reactions plates. After, he starts a gait cycle, making sure that in each step one foot is touching one plate, so the ground reactions can be captured correctly. 2. Squat without exoskeleton: The subject withthemarkers’ protocol seen inFigure13 starts from a motionless position outside the ground reactions plates. After, the subject place both feet in the two ground reaction plates separately and starts a full squat cycle where the knees flex and the whole body goes down, keeping the torso in the same position. 3. Walk with exoskeleton: The subject with the markers’ protocol seen in Figure 14 starts from a motionless position outside the ground reactions plates. After this, he repeats the same movements done in the "walk without exoskeleton" capture. 4. Squat with exoskeleton: The subject with the markers’ protocol seen in Figure 14 starts from a motionless position outside the ground reactions plates. After this, he repeats the same movements done in the "Squat without exoskeleton" capture. 5. Flex left knee: The subject with the markers’ protocol seen in Figure 14 starts from a motionless position outside the ground reactions plates. After this, the subjects stays outside the ground reaction plates, and he starts flexing and straightening the left knee repetitively with the rest of the body without motion. 4.3.1 Data processing After the data collection has been made correctly, data has to be processed in order to start the mechanic study. The output of these experiments are two files describing the motion of the markers and the torques and forces measured by the ground reaction plates. The files needed to perform the kinematic and dynamic analysis in OpenSim are described in Figure 12 as well as the transformation of files needed to obtain the final results. 4.4 Markers protocol To capture the motion of the human body, IR cameras are used with the help of reflective markers placed in strategic points of the body. The number of markers and their location in the body is not trivial, but it depends on different factors explained in this section. The first step in the analysis of the captured motion is to do an inverse kinematics study of the motion, which is explained with more detail in subsection 5.2. The basic principle of this tool is to obtain a temporal evolution of the generalized coordinates of the model by solving an optimization problem where the square root of the difference between model and experimental markers is minimum. This way, the quality of the marker’s placement in both the model and the subject during the experimental capture will influence in the quality of the results of the inverse kinematics. In the marker’s placement process, two basic factors need to be considered. Firstly, the more markers placed, the best kinematics results will be obtained. However, a higher marker density will make the experiment more complex by adding problem in the markers detection and adding complexity in the process. This way, when deciding the number
Modelling, simulation and optimization of an assistive device for SCI patients pag. 35 Figure 12: Diagramshowingthe files needed toperforma kinematic and dynamicanalysis in OpenSim of the markers placed, it will be interesting to find an equilibrium between these two factors. In order to have a valid marker’s placement, it must be possible to mathematically describe the location and orientation of the respective bodies of the model. In the general case where there is a body in the space with six degrees of freedom, three markers are needed. However, the number of markers needed in the bodies with less than six degrees of freedom will depend on the type of joint used with their parent body. For these bodies, if the child body is connected with the parent using a joint that provides three degrees of freedom, two markers are needed to determine position and orientation and if the joint used only gives one or two degrees of freedom, only one marker is needed to define the child body. In both cases, it is important to make sure that the marker is not placed in a common point between the parent and the child bodies. If the joint between bodies does not give any degrees of freedom (i.e. Weld Joint) no extra markers are needed to describe the child body. It is also important to notice that the number of markers described is only the minimum requisite, and exceeding this number will not cause any problem when tracking the system. Finally, the points chosen in each body must be easy to identify so the experimental placement and the model placement are as close as possible. This way, the chosen points will have to be known anatomic points. Another factor to choose a location for a marker is that the closest points to the bones give the best results because undesired movements from soft tissues there will be the minimum and the relative motion between markers and bones will be negligible as expected.
pag. 36 Bachelor’s thesis 4.4.1 Markers protocol used As long as there are two different models used in this thesis (the Assisted model and the Unassisted model), two markers protocols will be used to track the motion. First, for the unassisted model, the marker’s protocol used can be seen in Figure 13. As observed, there are a total number of 21 markers placed in different parts of the body. Figure 13: Marker’s protocol for the unassisted model The marker’s names are seen in table 10. It is observed that the toes and the talus bodies do not have any markers with them. This means that the relative movement with these bodies and their parents bodies will not be studied. This simplification has been made because these two bodies can be neglected from the study of the movement of the knee. It is also observed that most bodies are over defined using the criterion defined in subsection 4.4. As mentioned in this section, this will only increase a bit the complexity of the system without affecting in the quality of the results. This has been made because the quantity of markers in the model is small enough to place extra markers. The marker protocol used in the Assisted model is very similar to the Unassisted model’s. As can be seen in Figure 14, the 21 markers used for the Unassisted model remain in the same position except from the marker number 6 "LKNEE" which has been moved because it couldn’t be seen due to the exoskeleton. Apart from this modification, 7 new markers have been placed, as can be observed in Figure 15. These markers aim to describe both the position and the orientation of the new element of the model, the exoskeleton. A description of the new markers can be seen in table 11.
Modelling, simulation and optimization of an assistive device for SCI patients pag. 37 Table 10: Name of the markers used for the unassisted model Body Markers in the body HAT RSHO (1) LSHO (2) CLAV (13) C7 (14) Pelvis RASIS (3) LASIS (4) SACR (17) Left Femur LHIP (15) LKNEE (6) Right Femur RHIP (16) RKNEE (5) Left Tibia LSHA (8) LANK (18) Right Tibia RSHA (7) RANK (19) Left Calcaneus LHEEL (20) LMT1 (10) LMT5 (12) Right Calcaneus RHEEL (21) RMT1 (9) RMT5 (11) Table 11: Names of the new markers added for the assisted model Body Markers in the body Orthosis Thigh UTHIGH (22) THIGH1 (23) THIGH2 (24) Orthosis Shank KNEEORTH (25) USHANK (27) LSHANK (26) Femur THIGHL (28)
pag. 38 Bachelor’s thesis Figure 14: Markers protocol used for the assisted model Figure 15: Detailed view of the markers placed in the exoskeleton
Modelling, simulation and optimization of an assistive device for SCI patients pag. 39 5 Kinematic and Dynamic analysis of the simulations Once the biomechanical models are set and the experiments in the laboratory have been made, the motion of a person wearing an exoskeleton is studied. The steps to make the kinematic and dynamic analysis using OpenSim are described in these sections, as well as the methodology used to calibrate the mechanical parameters of the device-user interface model. 5.1 Scaling After doing the motion captures and processing the data, there is one step before making dynamic and kinematic analysis. First, the model dimensions need to fit to the studied subject. In order to do this, the scaling tool from OpenSim is used. The Scale Tool seen in OpenSim modify the anthropometry of a model so that it matches a particular subject as much as possible. The scaling of the model is performed by comparing the experimental marker data captured to the virtual markers placed manually on the OpenSim GUI. In addition to scaling a model, the Scale Tool can be used to adjust the locations of virtual markers so that they better match the experimental data [33]. 5.1.1 Scaling process The inputs and the outputs of the scaling process done by OpenSim are the ones described in Figure 16. The inputs are a Motion Capture of the markers (TRC) and the model to be scaled, and the output is the scaled model with the markers replaced and a modified anthropometry. Figure 16: Scheme of files involved in the scaling process where the inputs are a model (.osim), a motion file (.trc) of the subject wearing the markers and a setting file (.xml) which is not needed if the settings are set manually The scaling process is used either to scale the model or replace the virtual markers in the model. Both methods are used to scale the models used in the project. Firstly, to scale the Unassisted model, some scale factors are added in the settings of the tool. Thus, the dimensions of the bodies will change and the model anthropometry adjusts to the studied subject’s. A comparative between the unscaled and the scaled models is seen in Figure 16. After scaling the Unassisted model, the orthosis device is added to the scaled model to obtain a first version of the Assisted model. However, this model’s markers are placed virtually with the help of the GUI. In order to have a final model with the markers placed in the
pag. 46 Bachelor’s thesis iii. Find parameters that can hold the weight of the exoskeleton, which is 18.53 N. (b) Find a rank of possible k values and repeat the procedure to optimize more the k value. (c) Determine a criterion which considers all the important factors and optimizes the model. 3. Once the bushing forces from the upper and the lower contact have been set, find a more optimal model, modifying the 4 parameters for each bushing forces with a variation of a 20% from the original value. This final step aims to find better results by studying numbers close to the ones obtained following the first method. 5.4 Inverse Dynamics Inverse dynamics is a tool in which the combination of measured kinematics and external forces are used to calculate net joint torques in a rigid body linked segment model [37]. In OpenSim, the inverse dynamics tool determines the forces at each joint responsible for a known motion, which is obtained using the inverse kinematics tool. This tool is used in this project to analyse the dynamics of the final obtained model. 5.4.1 Joint torques and residual forces As detailed in subsubsection 3.2.2, there are some joints in the skeletal model. Each joint has generalized coordinates specified in Table 9 associated with an actuator that controls them. Furthermore, residual forces and moments acting on the pelvis are found. In reality there are no physical elements linking the pelvis and the ground, therefore, these forces should have values very close to zero. Using the inverse dynamics tool can lead to errors due to the following aspects: 1. Assumption of idealized pin joints and rigidity of body segments 2. Measurement errors in kinematic data caused by noise and skin artefacts lead to incorrect joint centre locations, velocities and accelerations 3. Deviation between the calculation of the anthropometric parameters for a particular subject and its own real value The sum of experimental errors and wrong assumption will cause that kinematics and forces are usually not consistent. In more formal terms, the system of equations of motion for the model is overdetermined. To solve this problem, non-existing residual forces and torques are added to the model from. Thus, the residual forces from the pelvis will never be exactly zero. However, the magnitude of this residual forces can be used to validate the study. As specified with the Forwards Dynamics tool, the Inverse Dynamics tool uses the second Newton’s law as specified in
Modelling, simulation and optimization of an assistive device for SCI patients pag. 47 [H]τ=M(q)¨qC(q, ˙q) + G(q)(3) Where: 1. [q, ˙q, ¨q]: Generalized positions, velocities and accelerations respectively 2. M(q): System mass matrix 3. C(q, ˙q): Vector of Coriolis and centrifugal forces 4. G(q): Vector of gravitational forces 5. τ: Vector of generalized forces 5.4.2 Resolution with OpenSim In order to solve this problem using OpenSim, the files specified in Figure 20 are required. The files required are: motion file (.mot) with the time evolution of the generalized coordinates. The file used as a motion file is typically the output from the inverse kinematics analysis. The ground reaction forces file (.mot) obtained from the ground reaction plates. Finally, the scaled model file is also needed (.osim). The output of this study is a Storage file which contains the time evolution of the net joint torques and the residual forces. Figure 20: Scheme of the files involved in the inverse dynamics process, where there are four inputs and one output. The four inputs are a scaled model (.osim), a foot-ground registration (.xml), the result of an inverse kinematics analysis (.mot) and a setup file which is only necessary if the configurations are not set up manually. Finally, the output of the inverse dynamics process is a net joint torques and residual wrench calculated in the experiment. Extracted from [37].
Modelling, simulation and optimization of an assistive device for SCI patients pag. 49 6 Results and Discussion The process described in the previous sections is done and discussed in this section. The final goal of this section is to obtain a final device-user interface model and analyse the dynamics of it studying the different recorded motions in the laboratory. In order to get to that point, firstly an Inverse Kinematics study is done for the different biomechanical models and all the recorded data and then, using the results obtained from the Inverse Kinematics study the Forward Dynamics tool is used to calibrate the mechanical parameters of the bushing forces. Finally, an Inverse Dynamics study is done using the force plates measures obtained in the laboratory. 6.1 Kinematic analysis After doing an Inverse Kinematics analysis, the evolution variation of the generalized coordinates can be observed for each motion capture. This project focuses on a lower limb exoskeleton that acts only in the left knee. For this reason, the knee is the main focus of the kinematic analysis. In the following paragraphs, the time evolution of the left knee and the time evolution of the orthosis knee in case it exists is described for the captured motion. 6.1.1 Motion without exoskeleton As detailed in section subsection 4.3, five experiments have been done. Two of the experiments do not include the exoskeleton. These experiments are simulated and analysed in this section. Walk without exoskeleton The first experiment carried out is a simple walk without the skeleton where the subject did three steps. After doing an inverse kinematics analysis, the variation of the left knee can be studied easily by plotting the angle variation of the joint. This time evolution can be seen in Figure 21. Figure 21: Angle value variation with respect to time for the walking experiment On the Figure 21 it is observed a first smaller step followed by two almost identical steps.
pag. 50 Bachelor’s thesis This factor is probably caused because the experiment starts with a motionless position. It is also observed that each gait cycle corresponds to the one found in literature [38] where the four phases of the gait can be found easily: 1. maximum knee flexion during stance phase 2. maximum knee extension during terminal stance phase 3. maximum knee flexion during swing phase 4. maximum knee extension adjacent to heel strike A description of this cycle is seen in Figure 22. It is observed that the figure describes the cycle with positive angles and starting from 0º. This difference is due to the reference system used in OpenSim. Figure 22: Analysis of the phases of a normal gait cycle. Extracted from [38]. The approximate values obtained for each part of the cycle are: 1. 10º 2. 20º 3. -55º 4. 18º The angular velocity of the joint can also be drawn in a plot using the inverse kinematics tool. As seen in Figure 23, as well as with the position, there is a first smaller step starting
Modelling, simulation and optimization of an assistive device for SCI patients pag. 51 from a motionless position followed by two almost identical steps. Figure 23: Angular velocity variation with respect to time for the walking experiment Squat without exoskeleton Once a normal cycle gait study has been done, a full squat is going to be studied. In it, the subject starts from a motionless position and completes three full squats. A plot of the variation of the left knee angle by time can be seen in Figure 24 where the subjects start after 4 seconds of simulation three similar squats with maximum values around 15ºand minimum values around -130º, After this, the subject stops the motion and returns to the default position. Figure 24: Angle value variation with respect to time for the squat experiment As done in the first experiment, the angular velocity plot can be drawn as seen in Figure 25. In it, it is also observed that the squat cycle is very similar for the three recorded squats.
pag. 52 Bachelor’s thesis Figure 25: Angular velocity variation with time for the squat experiment 6.1.2 Motion with exoskeleton Once all the captured motion without exoskeleton is analysed, the exoskeleton device can be introduced to the system so its behaviour can be analysed. Two main factors are relevant when analysing the behaviour of the left knee in this section. On the one hand, it is interesting to analyse the behaviour of the orthosis left knee with respect to the human left knee. Another important focus of this point is to see if the exoskeleton produces changes in the normal behaviour of the knee compared to the experiment without exoskeleton. Walk with exoskeleton First, as done in the motion without exoskeleton, an analysis of a simple walk is done. In the Figure 26 it can be observed that three steps has been made as well as with the unassisted model. A first smaller step is followed by two bigger steps which present similar behaviour. In the same figure, there are two extra lines that describe the time evolution of the angle between the upper and the lower part of the exoskeleton in the different models. In the model where the upper part of the exoskeleton is connected to the femur by a weld joint, the device does not present any relative motion with the femur and the result of the movement of the orthosis knee is shown by an orange line in Figure 26. In the other models where the upper part of the exoskeleton is connected by free joints with the femur or the ground they both present the same motion, and it is represented with a yellow line in the same figure. A little difference in the behaviour of the exoskeleton is observed in both cases, without significant changes. This difference is caused by the existing relative motion by the orthosis thigh and the femur, which is contemplated by the Free Joint models but not by the Weld Joint models. Although the Free Joint model describes the motion more accurately, the Weld Joint model does not have significant changes. The left knee and the orthosis knee coordinates are defined separately and the initial value for both coordinates do not match generally. Thus, instead of plotting the time evolution of the angles, an angle variation is plotted in Figure 26 where the initial offset is deleted for all the plots.
Modelling, simulation and optimization of an assistive device for SCI patients pag. 53 If the walking motion is compared to the captured motion without exoskeleton, some changes are observed. In order to compare both motions, it is useful to obtain the angle values of the knee angle for each part of the gait cycle described in Figure 22. 1. -4º 2. 0º 3. -50º 4. 9º The steps two and three present a slight difference between each other, so the third steps have been used to get the values of the gait cycle angles. If these values are compared to the cycle gait without exoskeleton, it is observed that all the numbers are closer to 0ºin the case with exoskeleton. This fact can be explained because the exoskeleton adds a torque between the femur and the tibia, which adds difficulty for the subject to walk normally. This leads to a reduction in the mobility of the knee. Figure 26: Angle variation with respect to time for the walking experiment The same way the angle values have been analysed, the knee velocity can be analysed for the model with an exoskeleton. This analysis is plotted in Figure 27. First, the orthosis knee speed for a walking motion with a weld joint and with a free joint are drawn in Figure 27. This plot can be compared to the Figure 23 which represents the same experiment without an exoskeleton. The shape of the time evolution of the angular velocity remains very similar, but the magnitude of the maximum and minimum angular velocity angles is smaller. This can also be explained because the exoskeleton adds a torque between the femur and the tibia that reduces the mobility of the motion.
pag. 54 Bachelor’s thesis Again, if the Orthosis Knee angular velocity is compared to the Left Knee angular velocity, the total difference between the plots is less significant than in the previous case where the angle values were analysed. However, there is still some difference between the normal knee behaviour and the behaviour of the Orthosis device modelled with a weld joint or a free joint. Figure 27: Angular speed variation with respect to time for the walking experiment Squat with exoskeleton After analysing an experimentinvolvinga walking motionwearing an exoskeleton, an analysis of a squat motion with an exoskeleton is made. As seen in Figure 28, four squats have been made, where the first squat is bigger in magnitude and the following ones have a similar shape with each other. If the motion of the left knee is compared to the motion of the same experiment without an exoskeleton seen in Figure 24, it is observed that the shape of the motion remains untouched but the magnitude of the maximum and minimum values is closer to 0ºin the experiment without exoskeleton. Again, this can be explained because the exoskeleton reduces the mobility of the subject’s knee. Again, instead of comparing the angle value between the orthosis left knee and the left knee, the initial offset when t=0s was deleted for both plots. This way, the Figure 28 shows the time evolution of these plots and the comparison can be done more accurately.
Modelling, simulation and optimization of an assistive device for SCI patients pag. 55 Figure 28: Angle variation with respect to time for the squat experiment Again, the angular velocity of a squat with exoskeleton Figure 29 is compared to the equivalent plot without exoskeleton Figure 29, and it is observed that the shape of the plots remain very similar while the magnitude of the maximum and minimum values decreases the same way that happened in the walk with exoskeleton experiment. It is also observed that the angular velocity of the orthosis knee in both models remains similar to the knee’s angular velocity, with slight but not significant changes in some points.
pag. 62 Bachelor’s thesis Figure 36: Simulations done for ten equidistant k values between k=1 and k=10 where the orthosis left knee angle for each simulation is compared to the one found in the inverse kinematics process In Figure 37, the MSE of each simulation from k=1 to k=10 is plotted. On this figure, it is noticedthat thesquared errorvariation decreaseswhen the kincreases, butthedifferences between the simulations are not easily seen. For this reason, the MSE for each simulation is computed and plotted in Figure 37. Figure 37: Plot of the MSE calculated for each simulation for ten equidistant k values between k=1 and k=10 The values plotted in Figure 37 can be observed in Table 13.
Modelling, simulation and optimization of an assistive device for SCI patients pag. 63 Table 13: Values of the MSE calculated in the simulations done for ten equidistant k values between k=1 and k=10 K value 12345678910 MSE*e-5 (mm2)182 51.6 25.9 16.4 11.2 8.39 6.60 5.42 4.56 3.99 After observing the results for all the simulated values of k a decision must be made on which k would suit the best to the model. The computational time and the generated forces need to be minimized, and this happens when the k value is minimum. However, the kinematic behaviour of the orthosis is not good when the k values are too small. Figure 37 it is observed that the differences of the MSE from one value of k to the following decreases in each step. It is considered the decrease of value from k=4 to values bigger than that are not significant, and that the movement of the orthosis shank using this value of k is similar enough to the one computed with an inverse kinematics analysis. For this reason, the value k=4 is chosen to model the lower bushing force. Once the k has been determined, the bushing forces can be completely defined with their final constant numbers having the following uniform parameters: 1. Translational stiffness component: 40 N/m 2. Rotational stiffness component: 40 Nm/rad 3. Translational damping component: 4 N/(m/s) 4. Rotational damping component: 4 Nm/(rad/s) 6.2.2 Modelling the upper bushing force using the first and second approach of the biomechanical model discussed in paragraph 3.3.2 Once the values for the model involving a weld joint, the parameters of the models involving a free joint can be studied. These models are different because one of them connects the orthosis with the ground and the other connects the orthosis with the femur. However, the kinematic behaviour of both of them is the same because the free joint does not have any restrictions in the motion of the model. Instead, what will have an influence in the model is the upper bushing force, which connects the femur and the orthosis thigh. The upper bushing force is the main difference between these models and the model that includes a weld joint. For this reason, in this section, the parameters of the upper bushing force will be discussed. The lower bushing force has the same responsibility in the model, which is to connect the tibia and the orthosis shank and transmit the motion of the two bodies. For this reason, the lower bushing force will keep the parameters used to define the bushing force in the first model studied. These parameters are described in subparagraph 6.2.1. The methodology used to determine the parameters for the upper bushing force is again the one discussed in subsubsection 5.3.3. Kinematic analysis First, the magnitude of the k needs to be set. In order to do it, the movement has been again simulated using k= 10−1,100,101,102, and k= 103as values
pag. 64 Bachelor’s thesis Table 14: Value of the MSE between the simulated values of the left orthosis knee and the value found in the inverse kinematics process for different k values following a logarithmic progression K value 0.1 1 10 100 1000 MSE (mm2)5.79e-2 1.57e-3 1.58e-5 5.57e-5 8.7e-5 for k. The knee movement is compared to the movement of the orthosis with the different values of the parameter k are shown in Figure 38. Figure 38: Plot of the simulated value for the left orthosis knee for different k values following a logarithmic progression compared to the plot found for the orthosis left knee in the inverse kinematics process Again, to analyse the simulation with the different values tested for k, the MSE has been computed for each simulation seen in Figure 39. The results of the MSE for each simulation is seen in table 14. As well as with the simulation with only one bushing force, the MSE has a big change from k=0.1 to k=1000. For the simulation with only one bushing force and one weld joint, the chosen value for k has been such that the mean squared error was 1.64e-4 which proved to give good results. Other parameters will be studied in the process to choose a value for k in the upper bushing force so the MSE can be other than 1.64e-4. Observing the table 14, the chosen k value must be around the value k=10 which gives the minimum MSE. However, when the simulation is carried out in the OpenSim GUI, another problem is observed. When the k value is not big enough, the bushing forces can not hold the weight of the exoskeleton, and it falls. Provided that in the experiments done, the relative motion between the femur and the orthosis thigh was almost non-existing, this relative motion has to be minimized. The described relative motion starts being negligible when the k value is between 10 and 100, so this will be the choice of study for the magnitude of the parameters for the bushing forces. Once decided the rank of values where k can be found, the k has been divided in ten
Modelling, simulation and optimization of an assistive device for SCI patients pag. 65 equidistant numbers between 10 and 100 and the results of the simulations have been plotted as seen in Figure 39 where the kinematics of the orthosis knee obtained in the inverse kinematics are plotted next to the time evolution of the orthosis knee for each value of k tested between 10 and 100. Figure 39: Simulations done for ten equidistant k values between k=10 and k=100 where the orthosis left knee angle for each simulation is compared to the one found in the inverse kinematics process Again, in order to observe the results with more detail, the MSE comparing the movement of the orthosis knee obtained in the inverse kinematics with the one obtained for each simulation from k=10 to k=100 is plotted in Figure 40.
pag. 66 Bachelor’s thesis Figure 40: Plot of the MSE calculated for each simulation for ten equidistant k values between k=10 and k=100 Where the MSE values are shown in table 15. It is noticed that all the values for MSE are beyond the chosen MSE in the first experiment, with a weld joint reaching a minimum when k=20. Table 15: Values of the MSE calculated in the simulations done for ten equidistant k values between k=10 and k=100 K value 10 20 30 40 50 60 70 80 90 100 MSE*e-5 (mm2)1.58 1.01 2.38 3.46 4.28 4.89 4.37 4.81 6.05 5.57 Although the minimum MSE value is reached when k=20, in order to choose the final value, it is first necessary to study the relative motion between the femur and the orthosis thigh.
Modelling, simulation and optimization of an assistive device for SCI patients pag. 67 Figure 41: Left: Time evolution of the vertical force produced by the upper bushing force for each simulation done for ten equidistant k values between k=10 and k=100. Right: Mean value of the vertical forces produced by the upper bushing force for each simulation done for ten equidistant k values between k=10 and k=100. When the k values increase, the total force generated by the bushing forces also increase until the point when a transition phase where the orthosis falls disappears. It is also observed that the mean value for k stabilize at a close number around the 18,53 N which is the weight of the exoskeleton. In order to make the final decision on which value for k is the most suitable, it is interesting tostudytherelative kinematicsbetweenthefemurand the orthosis thigh. In Figure42, the relative position between these two bodies is computed for each simulation. Similarly to the Figure 41 it is observed that the bigger the k value, the more similar is the behaviour compared to the experimental one (where the relative position remains constant with time). Considering the figures 42 and 40 the value k=70 is chosen because the exoskeleton has a good kinematic behaviour compared to both the knee angle and the femur position. It is also the first k value for which there is a soft transition phase in Figure 42.
pag. 68 Bachelor’s thesis Figure 42: Plot of the relative position of the upper part of the exoskeleton with the femur for each simulation done for ten equidistant k values between k=10 and k=100. After this choice, the bushing force parameters are described as: 1. Translational stiffness component: 700 N/m 2. Rotational stiffness component: 700 Nm/rad 3. Translational damping component: 70 N/(m/s) 4. Rotational damping component: 70 Nm/(rad/s) 6.2.3 Refining the bushing force parameters After adjusting the parameters of the upper and lower bushing forces, the model obtained can already be used to be studied dynamically and make simulations. However, to further explore the possibilities of the parameters, a new study is presented where the parameters will be optimized with new values close to the ones obtained in the previous sections. In this study, the values for the upper and lower bushing forces will be explored for the 16 models presented in table 16.
Modelling, simulation and optimization of an assistive device for SCI patients pag. 69 Table 16: Simulations done for 16 different models where the value of the bushing force parameters has a positive or negative 20% variation compared to the optimal model found in subsubsection 6.2.2 To obtain these 16 different models, each parameter of the bushing force has been tested either 20% higher or 20% lower than the optimal model. Always keeping a symmetrical behaviour with the upper and the lower bushing force. The aim of this study is to obtain more optimal parameters for the bushing forces where the assumptions made in the beginning of the previous sections are broken. This way, the bushing force parameters can no longer be: 1. Translational stiffness component: 10*k N/m 2. Rotational stiffness component: 10*k Nm/rad 3. Translational damping component: k N/(m/s) 4. Rotational damping component: k Nm/(rad/s) The quality of the results obtained from the 16 simulations, as well as done during the previous sections, is obtained comparing the mean squared error between the simulated movement of the knee and the one obtained using the inverse kinematics tool from the real experiment. Furthermore, the relative position between the upper part of the exoskeleton and the left femur will be studied to avoid undesired motion. The relative position between the exoskeleton upper part and the left femur is plotted on Figure 43 for each simulation. On this figure, it is observed that the simulation are divided basically in two groups. First there is a group with an average fall of approximately 0.032 meters that is formed by the models 5, 6, 7, 8, 13, 14, 15 and 16. The rest of the models also have similar behaviour, with an average fall of 0.021 meters. The main difference between the models included in both groups is that the models that form the first group have the low translational stiffness value, whereas the second group have the high translational stiffness value.
pag. 70 Bachelor’s thesis If the study is focused on the mean squared error between the simulation angle variation of the knee and the observed one, it is observed that there is a big difference between the models with a high and a low rotational stiffness, obtaining better results when this parameter is bigger. The results of these studies are also slightly better when the damping values decrease. Figure 43: Plot of the relative position of the upper part of the exoskeleton with the femur for each simulation described in table 16 After making these two studies, the models 2, 3 and 4 have a very similar behaviour and the three models can be chosen to make further experiments. It is also observed that smaller values for these parameters make the simulations easier for OpenSim, so it is convenient to lower these parameters. This way, the model number 4 is chosen to make a further analysis in the following sections. If the results from this model are compared to the ones obtained in the previous section, it is observed that the results are slightly better in quality. The MSE obtained has now a value 9.1% lower than the one resulting from section 6.2.2. 6.3 Dynamic analysis When all the parameters of the model have been set, it is time to study the dynamics of the model in the different recorded motions. Only the motion from the walk and squat experiment have been recorded with the ground reaction. Thus, only the dynamics from those experiments can be studied. The dynamic study of those experiments will be done using only the models containing a free joint with the parameters found in subsubsection 6.2.3 because it is considered to have a closer behaviour to the one in real life because it lets a relative motion between the femur and the upper part of the exoskeleton. And the final model has the following
Modelling, simulation and optimization of an assistive device for SCI patients pag. 71 mechanical properties for the lower and upper bushing forces, respectively. Lower bushing forces: 1. Translational stiffness component: 48 N/m 2. Rotational stiffness component: 48 Nm/rad 3. Translational damping component: 3,2 N/(m/s) 4. Rotational damping component: 3,2 Nm/(rad/s) Upper bushing forces: 1. Translational stiffness component: 840 N/m 2. Rotational stiffness component: 840 Nm/rad 3. Translational damping component: 56 N/(m/s) 4. Rotational damping component: 56 Nm/(rad/s) 6.3.1 Walk Experiment In order to know the forces and torques involved in the walk cycle of a healthy subject wearing an exoskeleton, an inverse dynamics study is made for the experiments where the ground reactions have been measured. The aim of this study is to know the torques involved with the exoskeleton in the experiment. In the inverse dynamics process, OpenSim assigns an actuator for each generalized coordinate in the model. Inside the generalized coordinates, there are six coordinates that link the model with the ground, which are considered residual forces. In the model with a free joint connected to the ground, there are twelve coordinates connecting the ground with the model. The residual wrench of the walk experiment in the two models are seen in figures. The quality of the results is strongly linked with the magnitude of the wrench of reactions with the ground. It is observed that the results have a better quality when the exoskeleton is linked with the femur and not the ground. Thus, the first model described will be the one used in the following calculations. In Figure 48, the torque produced by the left knee and the orthosis knee is plotted. It is observed that the resulting torque produced by the knee has a positive value, which fluctuates with time due to the walking motion of the subject. On the other hand, the torque produced by the orthosis knee has a negative sign and a lower magnitude. The results can be initially observed as a positive torque generated by the muscles in the experiment and a negative torque generated by the friction in the motor. However, some tests show that the negative sign of the orthosis knee does not belong to a friction of a motor, but it is due to an overdetermined problem where the net torque of the knee is the sum of both plots. The magnitude of the orthosis knee torque reaches values higher than
pag. 78 Bachelor’s thesis Figure 53: Left: Bushing forces generated by the upper bushing force during the walk simulation. Right: Torques generated by the upper bushing forces during the walk simulation. It is observed that the vertical bushing force is the responsible for holding the weight of the body, so it oscillates around a value close to the weight of the exoskeleton (18.53 N) as seen in Figure 41 for another experiment. The x and z forces oscillate around 0 N with the x force having a bigger importance, reaching at some points the 15 N. It is also observed that the produced torques are very small. Figure 54: Left: Bushing forces generated by the lower bushing force during the walk simulation. Right: Torques generated by the lower bushing forces during the walk simulation. The lower bushing forces seen in Figure 54 are in general smaller than the upper bushing forces because its parameters are also smaller. It is observed again that the vertical force is bigger than the force x and z. This happens because the upper force is not able to hold the total amount of the weight of the exoskeleton, so the lower bushing force is responsible to carry with the rest of the weight. The shape of the forces produced is almost identical to the ones seen in Figure 53 with a lower magnitude. Although the torques produced in the x and y-axis by the bushing forces are almost non-existing, there is a bigger torque produced by these forces in the z axis.
Modelling, simulation and optimization of an assistive device for SCI patients pag. 79 7.2 Predicting a squat with an exoskeleton Following the same criteria as in the section 7.1, the kinematics and dynamics involving the exoskeleton will be analysed in this section. First, in Figure 55 it is observed that the motion of the orthosis knee is almost identical as the left knee for the simulated motion which is the one found in paragraph 6.1.1. Figure 55: Left: Comparison of the trajectories of the angle value of the orthosis left knee and the left knee for the squat simulation. Right: Comparison of the angular velocity value of the orthosis left knee and the left knee for the squat simulation. The dynamic analysis of the exoskeleton in the model during the observed squat is seen in figures 56 and 57. Figure 56: Left: Bushing forces generated by the upper bushing force during the squat simulation. Right: Torques generated by the upper bushing forces during the squat simulation. It is again observed that the vertical force oscillates around a number close to 18.53 N which is the weight of the exoskeleton. The oscillation observed in this experiment is bigger to the one observed in the walking motion, due to a more energetic movement of the exoskeleton. Here, the x torque is significantly bigger than the y and z torques.
pag. 80 Bachelor’s thesis Figure 57: Left: Bushing forces generated by the lower bushing force during the squat simulation. Right: Torques generated by the lower bushing forces during the squat simulation. It is again observed in Figure 57 that the vertical force produced by the lower bushing forces has a value around 1 N where there exist no motion and the X and Z forces have values around 0. However, when there is motion, all the forces oscillate almost symmetrically for the three squat repetitions. After doing these predictive simulations it has been tested that following the steps described in this thesis, an exoskeleton can be introduced in a biomechanical model of a person and a dynamic study of its impact to the system can be done.
Modelling, simulation and optimization of an assistive device for SCI patients pag. 81 8 Project impact and implementation 8.1 Environmental impact Since this project have been made mostly by computer, the environmental impact is not significant. However, some factors could be considered. The biggest environmental impact occurred when the experiments were taken. The material used in those experiments consisted in 28 reflective markers and approximately 84 cm of stick tape. The reflective markers already belonged to the biomechanics department and none was lost. However, the stick tape was not reusable after the experiments. The computers, force plates, infrared cameras and other electronic devices used for this thesis were deteriorated. When these devices come to the end of their product lifetime, the European Directive 2012/19/UE should be followed. The electrical consumption related to this project can be difficult to estimate. All the electronic devices used for this thesis use low quantities of energy, with the laptop battery being the principal source of energy waste. However, this does not represent a significant increase in the electrical consumption of the biomechanics laboratory at the UPC. 8.2 Work plan The work plan of this thesis is described in the present section. On figure 58, a visual explanation of the different tasks done and the time taken in the development of those tasks is detailed. The tasks have been divided in: 1. Literature review: Consisting of finding and reading papers of interest in this field. 2. Implement model in OpenSim: Consisting of developing a biomechanical model of a person wearing an exoskeleton 3. Experiments: Consisting of making experiments in the Biomechanics Laboratory at the UPC 4. Obtain model parameters: Consisting of using the experimental data to adjust the mechanical parameters used in the OpenSim model. 5. Model validation: Consisting of a dynamic study and predictive simulations with the obtained OpenSim model. 6. Thesis writing: Simultaneously to the development of the project, consisting of writing all the progress of the thesis.
pag. 82 Bachelor’s thesis Figure 58: Gant diagram of the thesis. 8.3 Economic cost of the project The economic cost of the project consists of the depreciation of material used for the project, the price of the licences and the cost of the professionals working on it. Finally, the electrical energy consumption is also taken into account.
Modelling, simulation and optimization of an assistive device for SCI patients pag. 83 Cost Factor Fixed cost [€] Life expectancy [Years] Variable cost [€/h] Useful life or work time [h] Cost related to the project [€] Personal laptop 1100 6 0,063 380 23,94 Laboratory computer 1500 8 0,065 4 0,26 Matlab licence 250 1 0,029 150 4,35 OptiTrack capture system 17000 9 0,656 4 2,62 Force plates 18000 9 0,694 4 2,77 Supervisors - - 50 19 950 Student - - 8 380 3040 Electrical energy - - 0,028 380 10,64 Total cost 4034,59 The equipments used have been a personal laptop owned by the student and the laboratory computer owned by the biomechanics laboratory in the UPC. Furthermore, an OptiTrack system and two force plates were used to make the experiments captures. The depreciation of this equipment has been calculated considering that the life expectancy of those devices were 6, 8, 9 and 9 years respectively. This equipment is considered to be used 12 hours a day, 5 days per week and 48 weeks per year. This way, the total life expectancy can be calculated for each device. The laboratory computer, as well as the OptiTrack system and the force plates, were only used when the experiments were taken. However, the personal laptop was used the whole time when the thesis was being done, which is 20 hours per week during 19 weeks. The only licence needed for this thesis was Matlab, which has to be paid every year, and it costs 250 €. It has been only used 150 hours. During this thesis, there has been a student working 20 hours per week during 19 weeks. The average income for a fourth year student has been considered to be 8 €/h. Moreover, there was a supervisor working 1 hour per week during the 19 weeks of duration. Finally, the cost of the electrical energy has been estimated as the consumption of the personal laptop, since the consumption of the light bulb is very low and the electronic devices of the laboratory were only used for 4 hours. It is considered that the personal laptop uses an average power of 100 W with an average price of 0,28 €/kWh. This represents a variable cost of 0,028 €/h.
Modelling, simulation and optimization of an assistive device for SCI patients pag. 85 Conclusions In the present bachelor thesis, OpenSim interface in Matlab has been used to develop a model for an exoskeleton and make a kinematic and dynamic analysis of a healthy patient wearing an exoskeleton. Concretely, motions captured at the Biomechanics Laboratory of UPC have been used to analyse the motion of a person wearing an exoskeleton and develop a mechanical model of an exoskeleton to make predictive simulations. The first step has been to obtain a general biomechanical model of a person and introduce an exoskeleton to it without calibrating yet the mechanical properties of it. Five different motions of a healthy subject have been captured in the laboratory. Two motions with the subject alone and three motions where the exoskeleton was introduced. After capturing the motion with a Motion Capture System and the foot-ground reaction forces, the data was processed and filtered. With the data obtained in the laboratory, an inverse kinematics process was performed to the model for each of the simulated motions. After that, the kinematics of all simulations were analysed and a comparison of the motion between the case where the exoskeleton was introduced, and the case where there was no exoskeleton was carried. After describing the kinematic behaviour of a person wearing robotic gait assistance, a method to determine the mechanical parameters for the device-user interface model was developed. After it, a working model of an exoskeleton implemented in a biomechanical model of a person was made using the Forward Dynamics tool from OpenSim with a model where the motion of all the bodies except the orthosis had been prescribed. After that, a process to optimize this values was made. Finally, once the parameters were validated the dynamics of the model were studied for the different motions recorded in the lab followed by predictive simulations where an orthosis was introduced to a model in a recorded motion where the healthy subject was not wearing an orthosis. During this thesis, a method to obtain a biomechanical model of a person has been described. Furthermore, a model of an exoskeleton have been created as well as the steps to calibrate the mechanical parameters involved in the device-user contact. The objectives set in the beginning of the project have been reached. A code to add an exoskeleton to a biomechanical model of a person have been developed using the OpenSim interface in Matlab, and the results show that a kinematic and dynamic study of a patient wearing an exoskeleton can be studied using the developed code. Moreover, one can simulate the behaviour of an exoskeleton using motions where the patient is not wearing an exoskeleton following the steps described in this project.
Modelling, simulation and optimization of an assistive device for SCI patients pag. 87 Acknowledgements Foremost, I would like to acknowledge and thank Massimo Cenciarini and Marcel Jané for their tireless support and strong dedication in our weekly meetings. Furthermore, I want to express my gratitude to Josep Maria Font and Albert Peiret who gave me the opportunity to start this project and guided me when I needed it the most. Moreover, I would like to thank the BIOMEC group for their sympathy and for creating a perfect work environment. Finally, I would like to thank my friends and family who have been a crucial support during these months.