{'fraction_non_alphanumeric': 0.029640181976931208, 'fraction_numerical': 0.006939019346537383, 'mean_word_length': 4.760190577024881, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Design an intelligent hybrid position/force control for above knee prosthesis based on adaptive neuro-fuzzy inference system

Received Dec 21, 2020 Revised May 18, 2021 Accepted Jun 19, 2021 This paper reviews the position/force control approach for governs an efficient knee joint in an active lower limb prosthesis, and the interfacing current control algorithm with human gate parameter is inserted. Two techniques are used to collect gait cycle data of leg: first, the foot ground force is obtained by the force platform device based on its position (x, y), then data of knee joint angles is recorded by using a video-camera device. The collected information is sent and used in the proposed intelligent controller. This intelligent control system used an adaptive neuro-fuzzy inference system (ANFIS) circuit in addition to the proportional integral derivative (PID) controller. This hybrid ANFIS-PID control system simulates and provides the ground force values. The experimental results show an excellent response and lower root mean square error (RMSE) compared with each of PID and ANFIS controller that implemented for a similar purpose. In summary, the results showed acceptably stable performance of the proposed position/force controller based on hybrid ANFIS-PID system. It can be concluded that the finest performance of the controlled force, as quantified by the RMSE criteria, is perceived by the proposed hybrid scheme depending on the controller intelligent decision circuit.


INTRODUCTION
The quantity of amputees, because of war, ailment, and mishaps is expanding. Patients with gone through removal medical procedure beneath knee have a knee joint, therefore strolling with a prosthesis is generally simple [1], [2]. In any case, with femoral amputees, an unnatural step (gait) happens when an inactive prosthesis is worn. Different sorts of prosthesis have been created for the natural strolling development of these amputees. The local limb creates huge net control over a stride cycle in numerous train capacities including strolling, strolling up steps and slants, running and bouncing [3], [4]. The created prosthesis can be partitioned into active prosthesis and passive one. Passive prosthesis comprises of a structure that stores vitality and decrease the physical weight of the wearer [5], [6]. Nonetheless, since it utilizes the force of the wearer to walk, amputees devour about 60% more vitality than typical individual [7], [8]. Passive prosthesis with a force source changes the impedance to help strolling [9], [10]. The dynamic prosthesis controls the knee joint edge, so it has less physical weight than the passive one, and permits natural strolling. Past examination teams have been considering the dynamic prosthesis of different structures and the dynamic prosthesis that can stroll in a complex strolling condition [11]- [14]. The position control approach based on electromyography (EMG) for transtibial prosthesis was surveyed in [15]. In the on-going years utilizing intelligence control, for example, neural network, fuzzy control, neuro fuzzy, that they can control nonlinear frameworks that would be troublesome or difficult to demonstrate mathematically. For example, Lianfang Tian et al. utilized a neural system approach for the movement control of compelled adaptable controller's robots [16], [17]. The authors have built up a controlled knee and lower leg prosthesis model, in which they utilized PID and ANFIS control [18], [19]. Current lithium-polymer batteries have a vitality thickness moving toward 200 W·h/kg, which empower the advancement of a transfemoral prosthesis with a sensible weight and a satisfactory, albeit restricted, scope of motion. The vitality density of such batteries is relied upon to about twofold in the following decade (driven to a great extent by the car business' requirements for electrical vehicles) [20], which will give a more liberal scope of motion. In this work, the advancement of lower leg (ankle) prosthesis with an electrically controlled dynamic knee is described. This prosthesis will have the option to include a force-based control system for steady, create human-scale power at the joints and composed cooperation between the client and prosthesis. The paper depicts the mechanical structure of the prosthesis, gives a review of the PID and ANFIS control system, presents exploratory outcomes on a healthy and amputee one, and talks about the electrical power necessities in various stride modes. This paper is organized in eight sections. Section two presents the problem statement. Sections three and four present the theoretical background. Section five and six designate the proposed control of hybrid position/force by PID and ANFIS structures. The results are discussed in section seven and the conclusion is presented in section eight.

PROBLEM STATEMENT
There are many etiologies of lower limb injury and deformity in Iraq, and choosing to reconstruction of the lower extremity and following an amputation patient are very challenge for both practitioners and patients due to the lack of financial resources. The main challenge for the user of a hip amputated prosthesis is that they rely on insensitive joints during ambulation, although there are many types of active knee in prosthetic centers because most of them are high expensive. The main objective of the proposed system is to design a lower limb with an effective joint above knee for femoral amputation patients, and to compensate them with low-cost alternative mechanisms that achieve a high proportion of balance and normal gait. It will allow for a full range of motion while maintaining comfort and stability to withstand rough terrain and other physical demands. Figure 1 show the structure of the implemented above knee leg prosthesis which designed at the Mechatronics Laboratory at the University of Kerbala, Engineering College, Kerbala. It includes the body, thigh with socket; a shank connects a dynamic prosthetic foot and active knee joint.

Figure1
. Above knee prosthesis prototype [21] Figure 2(a) shows the leg prosthesis as demonstrate as a three links mechanical scheme. Each joining rod can be revolving in the x-z plane about the y axis as shown in Figure 2(b). Body of the robot is represented by the connecting rod 1, where point A is geometrical center of mass. Jb and Mb are the moment and mass of inertia respectively. The thigh is represented by the connecting rod 2 with the geometrical center of its mass. For a quadruped robot at operation space model, the objective is the position control of the foot contact point (point D), therefore, the generalized coordinates will be as X = [XD; ZD ; r] in the operation space. Also, the value of r can be overlooked when calculating ZD because of it much smaller than the height of the leg.

KINETIC MODELLING OF THE PROSTHESIS SYSTEM
During the design of an actuation system, the elementary kinetic performances can be provided by the analyses of the velocities, displacements in addition to the forces. For dynamics system analyses, a precise kinetic model is necessary and it can be established depend on a good understanding of both the mechanical and electrical properties of the dynamics system [22]- [25].

Modelling analysis of the lower limb prosthesis
A human lower limb or leg prosthesis can be modelled as a framework of robotics manipulator with rigid linkage. Lagrangian formulation is used in this paper to obtain the equation of motion for a system with kinematic model and solve the inverse dynamics of the system which is important for moment control of active-knee prosthesis actuator.

Kinematic model analysis
The prosthesis leg can be modelled as a scheme of three parts: foot, shank, and thigh as shown in Figure 2. It's kinematic model, dividing the body into two halves left and right passing from anterior to posterior in a sagittal plane. There are some assumptions in the kinematic analysis such as: − Based on anthropometric data in [24], lengths of links are: shank length l s = 0.4182m, thigh length l t = 0.4165m, and l f = 0.0981m which represents length from ankle to metatarsal. − The leg base is placed at the hip joint O (x A , z A ), with the knee joint at O (x A , z A ), the ankle joint at O (x A , z A ) and the foot at O (x F , z F ). − Revolute type is chosen for all joints with known initial values and boundaries of angles for hip, knee, and foot (∅ h , ∅ k , ∅ a ) are known. − The goal position has available coordinates.

Forward kinematics model
The position and the orientation of the foot prosthesis can be determined using the forward kinematic. Numerous analytical and geometrical methods have been suggested to resolve the kinematics. The transformation in the reference system can be represented in a homogeneous matrix by using Denavit-Hartenberg's process [24]. Thus, for the leg in the sagittal plane the forward kinematic model is: = ( 2 + 2 ) 1/2 , 1 = ( 2 + 2 + 2 ∅ ) 1/2 , 2 = ( 2 + 2 + 2 ∅ )

Inverse kinematics model
It can be used to determine the joint angles that implement the definite position of foot prosthesis. The following analytical solutions can be used, in which the final position and the orientation of foot are predetermined:

Dynamic model analysis
Hip and knee torque, which are imposed by forces acting through the tendons and ligaments, are presented by and . and represent the horizontal and vertical components of ground reaction force. and represent the forces acting on the femoral head that are applied by the socket. As shown in Figure 2(b), the model of human lower limb can be simplified to a planar serial robotic manipulator. The inverse dynamics computation of this robot can be developed using the Lagrangian energy method [21].
Newton's Second Law is used to derive dynamic equations of the proposed leg motion and Lagrangian mechanics to verify them. Anthropometric data [26] is used for all masses and measurements. A double inverted pendulum is used to symbolize the dynamics motion of the proposed leg. Figure 2(b) shows the prosthesis and the residual leg symbolized as two pieces. These two pieces are connected by a knee hinge joint. The lower piece revolves around an origin of the world coordinate system as a pivot point on the ground. The structure is represented by Lagrangian as the difference between the kinetic and potential energies [26]. So, the Lagrange movement equation is: The matrix representation is as: Thereby, we get the hip and knee torque equations as fellow: where, : hip torque, : Knee torque, g: Acceleration gravity, and : Mass thigh and shank respectively, and : Length thigh and shank segment respectively, : Center length thigh segment, : Center length shank segment, : cos ∅ , : sin ∅ , : cos ∅ , : sin ∅ , − : cos(∅ − ∅ ), − : sin(∅ − ∅ ), and + : sin(∅ + ∅ ).
Both models (i.e. Kinematics and Dynamics) are based on human biomechanics, and link lower limbs lengths and its masses. Furthermore, Ground Reaction Forces (GRF) and positions are obtained from anthropometric measurements and gait cycle data experimentally (motion capture system, force plates equipment) [26]. The flow diagram of the experimental setup, involving motion capture measurements, inverse kinematics and inverse dynamics analyses is described in Figure 3.

CONTROL OF HYBRID POSITION/FORCE
In gait control, the position, force and speed, are the parameters that can be changes or control to have the final goal, the gait process for the amputee person. D. A. Kadhim et al. [27], the work was done by using the ANFIS controllers that regulate the ground force, simulating the flexion-extension angle values and the moment of DC motor for the designed active knee. The gait laboratory was used to collect the experimental motion data of the revolute knee joint, and then the ANFIS controller transform them to joint angles. While in this paper, position/force controller was used by a Hybrid ANFIS/PID system to accomplish the gait process, as shown in Figure 4. The architecture of the proposed hybrid position/force controller efforts to solve the following: − Control of foot position on the directions of the natural restraint force. − Control of foot force on the directions of the natural restraint position. − Single system to implement these modes by combination of the degrees of freedom.
With the above plan, the desired task space will specify directions of forces based on the environment for the movement of the end effector, and the other directions for the desired path in, as shown in Figure 4. So, the task space is separated into a force control subspace and a position control subspace. And then, hybrid control structure designed with two parallel loops, one for force control and the other for position control. Outputs of these two paths are entered to a summing circuit before being sent to the foot in the form of a total control signal. Actually, each joint performs both controls (force and position), this synchronized action of these controls may cause antagonism, as the same actuator receive two different control signals. So, a diagonal selection matrix (S) is used to avoid conflict between them. S matrix will give the capability to select the type of control either force or position. The form of the hybrid controller signal is: where, ∈ × is a diagonal matrix including of 1 and 0, which provide address for control force and position. ∈ × represents an identity matrix. ∈ × are the controller parameters. ∈ × represents proportional gains of position and force. ∈ × corresponds to the derivative gain relative to the velocity of the leg foot as an end effector. is the torque. is rigid environment force.
is the desired ground reaction force. is horizontal position foot.

DESIGN OF CONTROLLER 6.1. Controller design using PID strategy
To be able to control a motion leg prosthesis process, the precise position/force of foot leg needs to be measurable and maintained. The designed system should respond to the applied input with a suitable overshoot a settling time and a zero steady state error as possible. To simplify the control design and analysis, two suggested controller PID and ANFIS with parameters for leg prosthesis will be proposed. As in many of control and regulator applications [28]- [30] it's important to achieve tight voltage or current regulation and good dynamic performance. Because of its strength and indirectly, there are many control applications that are commonly used the PID controller. In the field of engineering, PID controllers had been around for a long time and the three controller gain parameters are typically set. But the drawback of the PID controller is that in dealing with device instability, which is parameter variations and external disruption, it is terrible, therefore, the combination of PID and ANFIS controllers is suggested in this study to achieve a marginally better output rather than the PID controller and ANFIS controller alone. The transfer function of PID control is given by: where, , and are the proportional, integral, and derivative gains respectively. Another useful equivalent form of the PID controller is in the form: where, = ⁄ and = ⁄ are known as integral and derivative time constant respectively. In design PID controller strategy the tuning PID parameter is used with depending on some rules related to error signal ( ) of input and output data. When the ( ) is positive and increase, it means the proportional gain be high, integral coefficient gain low and the derivative coefficient gain is low, on the contrary, when the ( ) decrease and approach to zero the PID parameters have to be smaller value for proportional gain , larger value of integral time constant and larger value of derivative coefficient gain .

Design of ANFIS controller
A controller based on ANFIS was suggested to control the operation of the designed Active knee by regulate the force of its DC motor. It comprises numerous fuzzy procedures such as: inference process, knowledge base in addition to fuzzification and defuzzification of data for Sugeno-type fuzzy inference system (FIS) Gaussian membership functions (MFs) are used which tuned by the NN learning process with input-output training data.
In this work, the collected "XY coordinates-force" dataset is used as the input-output data to train ANFIS controller in order to simulate force as an output signal. In the stage of fuzzification, the linguistic variables (+B, +M, +S, Z, -S, -M, and -B) are used to represent the crisp XY input data values as shown in Table 1. These factors were entered to the stage of rule based to generate set of 7×7=49 IF-THEN rules, as shown in Table 2. The back propagation training algorithm is used to generate the force signal as a desired output by selecting the proper rules through the learning process. The control decisions will be generated in the process of inference, based on Table 2. Centre of gravity method in the defuzzification stage was used to receive the linguistic control output, and then generate the force data as crisp values.

RESULT
In this examination, the force-plate was initiated utilizing foot pressure as input information for all tests. The inflexibility and hampering boundaries of the revolute lower leg joint were characterized to by interpretation in the x and y axes. Figure 5 shows the XY data produced by cycle on the force plate device by the amputee, and the values of the measured force. Figure 5(a) signifies the ankle transformation trajectory in the X and Y axes joint. Figure 5(b) shows the heel foot section simulated by ground reaction forces adaptive neuro-fuzzy controller was created with a gear box, force/position utilizing a DC engine. MATLAB 2018b was utilized to reproduce the work of the framework and to prepare the adaptive neuro-fuzzy systems with the trial XY coordinates-force. The structure of the neuro-fuzzy system comprised of 2-4-1 neurons at the input-hidden-output layers, as appeared in Figure 6. The surface plot for the force values as a function of XY regions was shown in Figure 7. The performance of each controller can be tested depended on the output response as shown in the Figure 8. Figure 8(a) shows the measured force and the simulated forces from both the PID and ANFIS controllers. From Figure 8(b), (c) one can see that the performance of ANFIS is better than PID at the transition regions as denoted by region 1 and region 2 at Figure 8(a). Also, this clearly observed from the error measurement shown in Figure 9 error was calculated by the difference between the measured force and the actuated output of each controller. From Figure 9(a), it is shown that the error obtained by PID controller is the minimum at some steps, while that error of ANFIS is the minimum at other different steps as shown by the straight line drawn at the zooming region shown in Figure 9(b). Furthermore, the error measured for the two controllers were acceptable values especially with the practical forces amounts used. Usually, the previous works that used two different controllers, the average is taken for the two outputs; this scheme was simulated as shown in Figure 10. The averaged result show as a third output between the two control signals.
Finally, the proposed hybrid scheme in this work was based on a decision circuit that chooses one signal from the controller that has the smallest error. The hybrid control system result is shown in Figure 11. The efficiency of the proposed controller has been examined by the real collected data through simulation for

CONCLUSION
This work reflects the mathematical calculation, software and hardware parts of the position/force control approach for govern an efficient knee joint in an active lower limb prosthesis. The proposed scheme has been conferred and practically tested. The finest execution combined position/force parameters were obtained by hybrid ANFIS-PID controller, where it is a good method to recover the adaptation for the nonlinear scheme situation. According to the results, the proposed hybrid ANFIS-PID controller has the capability to approximate nonlinear function such as biomechanical parameters gait cycle model best than the PID controller. Both controllers were implemented and examined to compare the strength and efficiency between each controller alone and the proposed hybrid ANFIS-PID controller. Consequently, from the system response, it intimates that the proposed controlling system is more forceful as it can adjust earlier even when there are fluctuations employed to the structure relative to the each PID or ANFIS alone. Where, at the transition, the performance of ANFIS is better than PID, also this visibly detected from the error measurement, the error achieved by PID controller is the minimum at some steps, whereas that error of ANFIS is the minimum at other different steps. Also, the errors measured with the two controllers were satisfactory values specifically with the practical forces' quantities used. Finally, the suggested hybrid system in this work was built on a decision circuit that select one signal from the controller that has the minimum error. Simulation results demonstrate that the proposed hybrid position/force controller follows to the desired gait trajectory smoother and closer. It represents an effort to simulate as natural as leg function to provide gait fluidity and stability as needed on irregular lands or during more complex activities. As a future work, the workability of the proposed hybrid controller with a properly distinct automatic tuning for both PID and ANFIS parameters will be performed with a suitable evolutionary method such as PSO. Also, it's possible to implement the entire control system by FPGA.