Designing and implementing an electronic system to control moving orthosis virtual mechanical system to emulate lower limb

This work is intended to individuals that have paraplegia as a result of spinal cord injury (SCI) and lost motion mobility, so the goal of this paper is to restore some degree of legged mobility to those people. The paper investigates the development of kinematic and dynamic model for the leg. Modeling and simulation of the system under investigation is implemented and evaluated using MATLAB/ SIMULINK®. Practical results obtained from under investigating lower limb model are compared with their counter parts of normal gait pattern. The error between the desired gait pattern and the obtained results is corrected using optimal control approach. It’s shown that the obtained results have validated the proposed approach. Both practical and simulation results have demonstrated the stability of the proposed control approach. It is believed that the proposed approach will help to establish an integrated system which emulates precisely the normal gait of human. Subjects: Biomedical Engineering; Robotics & Cybernetics; Control Engineering; Mechatronics


Introduction
Nobody is immune to an accident or a pathology causing one's a partial/total impairment of its mobility. One is prone to paraplegia. For instance, there are many people in areas around the world that suffer from crises or civil war, were injured and unfortunately became paralyzed because of their spinal cords injury or loss of their limbs. One of the most significant impairments resulting from paraplegia is the loss of mobility. Patients with decreased mobility suffer from a great inconvenience in their daily life and a limited participation in social life. Developing devices to allow paraplegic patients to walk again would dramatically change their personal and social lives. Several lower limb orthosis have been developed and described in literature (Bortole, Rovira, & Lorente, 2013). The following state of the art focuses on orthosis developed specifically for restoration of mobility in paraplegic individuals. Lower limb orthosis or in other word exoskeletons are robotics devices worn by an operator that fits closely and operates in parallel with the human legs, augmenting human performance. In the field of exoskeleton devices a classification can be made depending on the disease and potential for improvement of the user abilities: • Rehabilitation exoskeletons: In a case of patients with neurological injury or with chronic incomplete spinal cord injury (SCI), a gait rehabilitation exoskeleton can help the user to adapt and recover the motion of his limbs. These rehabilitation exoskeletons reproduce the motion of the user limbs in a body-weight supported treadmill (Mayr et al., 2007;Vallery, van Asseldonk, Buss, & van der Kooij, 2009). This motion helps in the formation of user new neural path-ways to relearn to walk (Ferris, Sawicki, & Domingo, 2005).
• Exoskeletons for partial assistance: In the case that one has lost strength in some of his or her limbs, such as an aged people, this portable exoskeleton device can detect the user intention by the use of electromiographical signal (EMG) and augment it (Fleischer, 2006), like in the hybrid assistive limb (HAL) (Lee & Sankai, 2002;Suzuki, Mito, Kawamoto, Hasegawa, & Sankai, 2007). As authors concluded in their study, HAL is not useful for all hemiplegic patients, although it may increase the walking speed and affect the walking ability. The HAL suit uses electromyography signals to provide power assistance, which may make it difficult for severely hemiplegic patients to perform activities using their own muscles. This could lead to instability, resulting in decreases in stride length and walking speed. Additionally, the drawback of this control system is that it requires a process of adaptation and adjustment to a specific user that can take up two months depending of each person, which makes it impractical in a rehabilitation setting.
• Exoskeletons for full support assistance: If the patient suffers from a complete spinal cord injury (SCI) which has resulted in paraplegia or quadriplegia, an assistive exoskeleton that helps a person to walk with lower-limb pathology can replace the function of a wheelchair. These types of exoskeletons are called active or powered orthosis.
Nowadays, some commercial active orthosis e.g. ReWalk from Argo Medical Technologies has hip and knee movements powered in the sagittal plane. It comprises a light wearable brace support suit, which integrates DC motors at the joints, rechargeable batteries, an array of sensors and a computer control system, but it cannot keep balance control, so the user should always be supported by crutches (Díaz, Gil, & Sánchez, 2011). ELegs from Ekso Bionics and some research devices like Mina (Neuhaus et al., 2011). Vanderbilt (Farris, Quintero, & Goldfarb, 2012) use position control mode with a fixed angle pattern, obtained from clinical gait analysis (CGA), for each joint to walk. The device weights about 12 kg and, similarly to others robotics exoskeletons discussed in this paper, it has only hip and knee as actuated joints. Ankle and foot support are not present on the device and it has to be used with an off-the-self ankle-foot orthosis.
In order to allow the exoskeleton to meet the needs of the wearer, it is necessary to develop a suitable control scheme. The complexity of the system dynamics, consisting of the exoskeleton and its wearer, associated with external disturbances, makes conventional controllers inefficient. This complexity has led researchers to several proposals concerning appropriate controllers. Some control schemes are based on a preliminary step of identifying dynamic parameters of the exoskeleton and its wearer. Other approaches are adaptive and are dedicated to generic exoskeletons that can be worn by humans having different morphologies. One example of such controllers is the neural adaptive approach. The universal approximation of neural networks (Gomes, Silveira, & Siqueira, 2011) represents one of their advantages. However, neural approaches require a step of offline learning to avoid undesirable behavior of the exoskeleton during the initialization phase. One can also find several works dealing with nonlinear control of exoskeletons as sliding mode technique (Madani, Daachi, & Djouani, 2014). The author in (Bortole et al., 2013) use fuzzy logic strategy to track a recoded gait pattern, however, the experimental results of fuzzy controller show that there's noticeable error between the reference gait pattern and exoskeleton actuation performance. The author in this work illustrates that this error can be minimized using the optimal control approach depending on the simulation results of previous work (Hasan & Chachati, 2017) which proposes an Optimal Control approach for lower limb kinematic model. A linear quadratic optimal controller (LQR) is implemented for the Low Level control, which tracks the angular position of each joint (hip, knee, ankle) (Hasan & Chachati, 2017).

Kinematics modeling
The kinematics analysis of an exoskeleton robot is the basis of the movement position, posture analysis and gait planning, which includes forward kinematics and inverse kinematics. Forward kinematics is used to find the position, velocity, acceleration and attitude of each link in the base coordinate system in the case of giving the relative position and joint variable parameters. D-H method is commonly used in forward kinematics calculation. On the contrary, the inverse kinematics aims to give three joint positions based on a desired Cartesian position (x, y, z) coordinates of the robot foot.

Forward kinematics
The coordinates for a single leg of the robot are defined in Figure 1.
In order to define the forward kinematics, the Denavit-Hartenberg convention is used. Note that this leg has only revolute actuators. Applying this convention on the robot leg we have (see Table 1).
Using these parameters one can define the transformation matrices form joint (i) to joint (i+1) . To generate a transformation matrix from the origin to joint 1, one first needs to make a transformation for each rotation and translation from the origin to joint 1. All transformation matrices have the following format as shown in (1) (Spong, Hutchinson, & Vidyasagar, 2011): The general form of transformation matrix is: After replacing D-H parameters in (2) for (i = 0, 1, 2), one could obtain the transformation matrices between joints.

Inverse kinematics
With the knowledge of the forward kinematics, we can also determine the inverse kinematics, which aims to give the three joint positions of the 3-legs system based on a desired Cartesian position (x, y, z coordinate) of the robot foot. The inverse kinematics can be solved for using o 0,3 of Equation (1) in the transformation matrix and setting them positions x, y, and z. One has then to solve for each of (1) the i , where i = 1, 2 and 3, values in terms of x, y, and z. The inverse kinematics for a single leg in this study are as follows: (3)

Dynamics modeling
It is important in modeling a robot motion to calculate the robot dynamics so that velocity, acceleration, and the forces associated with the robot motion are accounted for. In this paragraph, we calculate the necessary dynamic equations to determine the necessary torques needed to be applied at a certain joint to produce the desired motion.

Jacobian Matrix calculation
The Jacobian can be defined as the relationship between joint velocity and manipulator end velocity.
One valuable use of the Jacobian is for calculating joint torques necessary in robot leg to maintain configuration in response to external forces applied to the foot.
Where J is the Jacobian of the joint position vector q, and F a three dimensional vector of forces on

Dynamics
The Lagrangian equation is used throughout the field of engineering as an energy based model of a physical system. The Euler-Lagrange equation for manipulator control is a variant of the Lagrangian specifically suited for determining joint torques for a multi-link manipulator. This equation provides the dynamic model for the manipulator.
The basic concept for the Lagrangian is set out in equation: where the Lagrangian is the difference between kinetic energy terms K and potential energy P throughout the moving body(s). However, in manipulator control, we use the Lagrangian to calculate the various joint torques necessary in a manipulator to generate desired joint positions, velocities, and accelerations. Those equations provide desired torque called the Euler-Lagrange equations.
The well-known calculating method Euler-Lagrange equations is used for a robotic manipulator (Barreto, Trigo, Menezes, Dias, & de Almeida, 1998). The kinetic energy for a single link is given as follows: Next we compute the potential energy for the n-Link manipulator (Niku, 2011): Depending on the dynamic model we can simulate the movement of the manipulator: K represents Corioles, gravity forces and friction torque.
We can write the Equation (13) as follows: Using Euler first order integration with sample time T s we have the position and velocity of joints as in Equations (14) and (15): Equations (13)-(15) represent the mathematical model of the exoskeleton which was built in MATLAB/SIMULINK® (see Table 2). (12) (k) =̇ k T s + (k − 1)

Optimal control system design
In this section we describe the proposed control scheme which is shown in Figure 2. The proposed controller design is based on solving quadratic optimal control problem has been presented to improve the dynamic performance and correct the position and angular velocity (that are mentioned in subsection (3.3.2) and given in Equations (14) and (15)) of each hip, knee and ankle joints to get the desired motion of the leg.
In optimal control, based on Liapunov approach the conditions for stability are formulated first and then the system is designed within these limitations. Thus, the designed system has a configuration with inherent stability characteristics (Ogata, 1994).
To solve the quadratic optimal control problem for the system given in (14) and (15), we must determine the control vector u op , which minimizes a selected cost function J as follows: where: X 9x1 : System state vector; U 3x1 : Control vector; Q 9x9 : Positive semi-definite symmetric matrix determines the relative importance of the error; and R 3x3 : Positive definite symmetric matrix determines the relative importance of the expenditure of the energy of the control signals.
The optimal control law is given as follows (17): P 9x9 is the state covariance matrix which can be obtained from Reccati equation which is given as follows (18): Depending on Equations (14) to (18) we can derive the extended linear state space equations including optimal controller for the three joints of the exoskeleton as follows (19): where: : Angular velocity of the joint; : Angular position of the joint; : Integral error of optimal controller; T s : Sample time; M: Inertia matrix after linearization; T: Torque acting on the joint; and K: The centrifugal effect, Coriolis effect and the torque generated on joint k by the gravity force.

Hardware system design
It was supposed that the optimal control strategy to be applied on lower limb exoskeleton, but because this prototype is not available, so bioloid humanoid robot is used instead. The exoskeleton contains five segments (two shank, two thigh and one hip) with six DOF s , in which hip, knee and ankle are powered joints. Each joint is actuated by a brushless DC motor. To achieve light weight and a small volume solution, strain wave gears were selected as a gearbox. These joints are equipped with two types of sensors: kinematic and kinetic. Kinematics sensors are used for measuring angular position, velocity and acceleration; kinetic sensors measure the force of interaction between user's limb and exoskeleton. Whereas the bioloid robot, is equipped with servo dynamixel AX-12 actuator (User's Manual's, 2016) for each joint (hip, knee and ankle). The dynamixel series robot actuator is a smart modular actuator that incorporates a gear reducer, a precision DC motor and a control circuitry with networking functionality, and it has a feedback loop for angular position, all in a single package. Despite its compact size, it can produce high torque and is made with high quality materials to provide the necessary strength and structural resilience to withstand large external forces. It also has the ability to detect and act upon internal conditions such as changes in internal temperature or supply voltage (see Figure 3).

Results
This section describes the obtained results from bioloid robot which works as a small actuated exoskeleton in the open loop then using LQR controller.  -6 show the reference sagittal plane hip, knee and ankle joints angle (blue) and the sagittal plane hip, knee and ankle actuators angle performed by the above design (red) in open loop. As noted the used module can track the normal gait due to using servo actuator in the design, however resulted responses don't reach their peaks, in addition there are remarkable errors particularly in the period from 15 to 55% of gait cycle that involves mid-stance, terminal stance and pre-swing stages, also the period from 80 to 95% which occupies mid-swing and terminal swing stages. Through these periods the weight of the body is transferred from leg to other, and the trunk is twisted forward, whereas the pelvis is moving towards the stance leg. Addition the motion of joints are opposite (as hip flexes, knee extends). All these effects causes disturbance in the response of the module, so an LQR was performed to minimize the error. Figures 7-9 show the reference sagittal plane hip, knee and ankle joints angle (blue) and the sagittal plane hip, knee and ankle actuators angular position performed by the above design (pink) using LQR controller. Figure 2 shows the control system of gait pattern. It consists of a gait pattern model plus three nested control loops, each one has a control loop to control the position of hip joint. The middle loop is used to control the position of knee joint, and the last one is designed for ankle joint control. Most of the above mentioned loops are designed depending on the optimal control approach considering the interactive dynamic coupling among these three control loops resulted from coupling effect among these joints. Therefore, this system is considered highly nonlinear. This nonlinearity affects the accuracy of the desired trajectory tracking if the controller parameters were not set carefully. As noted, after applying the proposed controller, disturbances that shown in open loop are minimized, and the response became as close as to the reference joints angle. Also the gait of the model is closer to the normal gait of human.    the swing phase and the hip is then kept flexed until initial contact (the beginning of the loading response, which is the first period of the stance phase). The peak extension is reached before the end of the stance phase, after which the hip begins to flex again. As shown the result of gait tracking motion is coincided with the desired one. Figure 8 depicts the reference sagittal plane knee joint angle (blue) and the sagittal plane knee joint angle performed by above design (pink). The knee shows two flexion and two extension peaks during each gait cycle. It extends rapidly at the end of the swing phase, becoming more or less straight just before initial contact and then start to flex again during the loading response and the early part of mid-stance ("stance phase knee flexion"), extends again during the later part of midstance, then starts flexing again, reaching a peak (around 54.594°) during initial swing ('swing phase knee flexion"). It extends again prior to the next initial contact. As it shown the proposed design has a perfect performance in tracking the normal gait. Figure 9 depicts the reference sagittal plane ankle joint angle (blue) and the sagittal plane ankle joint angle performed by above the design (pink). The ankle is usually within a few degrees of the neutral position for dorsiflexion/plantarflexion at the time of initial contact. After initial contact, the ankle plantarflexes, bringing the forefoot down onto the ground. During mid-stance, the tibia moves forward over the foot, and the ankle joint becomes dorsiflexed. Before opposite initial contact, the ankle angle again changes, a major plantarflexion taking place until just after toe off. During the swing phase, the ankle moves back into dorsiflexion until the forefoot has cleared the ground (around feet adjacent), after which something close to the neutral position is maintained until the next initial contact.