INTERNATIONAL JOURNAL OF COMPUTERS COMMUNICATIONS & CONTROL ISSN 1841-9836, e-ISSN 1841-9844, 14(5), 733-752, October 2019. Design, Modeling and Control of Bionic Knee in Artificial Leg H.L. Xie, Y. Xie, F. Li Hualong Xie* Department of Mechanical Engineering and Automation, Northeastern University, Shenyang 110819, China hlxie@mail.neu.edu.cn Yao Xie Department of Mechanical Engineering and Automation, Northeastern University, Shenyang 110819, China 1870220@stu.neu.edu.cn Fei Li Department of Information Science and Engineering, Shenyang University of Technology, Shenyang 110870, China lifeisut@163.com Abstract: The biped robot with heterogeneous legs (BRHL) greatly facilitates the development of intelligent lower-limb prosthesis (ILLP). In the BRHL, the remaining leg of the amputee is simulated by an artificial leg, which provides the bionic leg with the precise gait following trajectory. Therefore, the artificial leg must closely mimic the features of the human leg. After analyzing the motion mechanism of the human knee, this paper designs a four-link bionic knee in light of the coexistence of rolling and sliding between the femur, the meniscus and the tibia. Drawing on the driving mechanism of leg muscles, two pneumatic artificial muscles (PAMs) were adopted to serve as the extensor and flexor muscles on the thigh. The two PAMs move in opposite direction, driving the knee motions in the artificial leg. To over- come the complexity of traditional PAM modelling methods, the author set up a PAM feature test platform to disclose the features of the PAMs, and built static and dynamic nonlinear mathematical models of the PAMs based on the test data. Next, a proportional-integral-derivative (PID) closed loop controller and sliding mode con- troller was designed for the bionic knee, referring to the kinetics equation of the knee. Through experimental simulation, it is confirmed that the proposed controller can accurately control the position of the four-link bionic knee, and that the designed bionic knee and PAM driving mode are both correct. Keywords: Bionic knee, biped robot with heterogeneous legs (BRHL), pneumatic artificial muscle (PAM), high-speed on-off valve, sliding mode control 1 Introduction Millions around the world have lost their lower extremities due to varied reasons, ranging from wars, earthquakes, diseases, work-related injuries, traffic accidents to accidental injuries. In 2006, China launched the second national sample survey on disabled people [4]. The survey results show that 29.07% (24.12 million) of Chinese with disabilities suffered from extremity disability; about 8% (2.26 million) of them had one or more of their limbs amputated, including Copyright ©2019 CC BY-NC 734 H.L. Xie, Y. Xie, F. Li 1.58 million of lower extremity amputees. In the US, around 1.60 million have lost some or all their limbs, and the majority (97%) of amputations caused by vascular complications target the lower extremities. A good chunk (25.8%) of these lower extremity amputations removes the leg above the knee [7]. Currently, there is not yet any biomedical technology capable of regenerating human tissues. In this case, the intelligent lower-limb prosthesis (ILLP) [6,10,19] is the most desirable way to compensate for the walking function of lower extremity amputees. This paper designs a novel biped robot with heterogeneous legs (BRHL) [15,17,21], laying a solid basis for the R&D of the ILLP. For example, the BRHL can be applied in prosthesis tests to disclose the walking features of the disabled wearing the ILLP, eliminating the need for the disabled to walk repeatedly in prosthesis, the physical and mental pains of the disabled in the tests, and the human interference in the test results. As shown in Figure 1, our BRHL consists of an artificial leg, a bionic leg and a robotic upper body. The artificial leg and the bionic leg correspond to the remaining good leg and the ILLP of the amputee, respectively. The artificial leg is required to simulate the normal gait of the remaining leg in an accurate manner, and provide the bionic leg with the precise gait following trajectory. Therefore, the control of the artificial leg is critical to the development of the entire BRHL [16,18]. Figure 1: The structure of the BRHL To satisfy the requirements on the artificial leg, this paper adopts the PAMs based on high- speed on-off valve control to replace the “flexor and extensor muscle groups”of the biceps and quadriceps of the human leg, and drives the joint movement. Compared with traditional robot driving modes (e.g. motor, hydraulic unit and cylinder), the two-PAMs driving mode bears great resemblance with the driving mode of human knee in motion mechanism and smoothness. During the normal motions of human knee, rolling and sliding coexist between the femur, the meniscus and the tibia; the trajectory of the instant center of rotation (ICR) is in the form of a J-shape curve. In our design, the J-shape ICR trajectory of the knee is achieved through a four-link bionic mechanism, which also enhances the system flexibility and stability [8]. It is a complex task to establish a model for the PAMs, due to their various nonlinear uncertainties, including but not limited to the friction of the woven mesh, gas compression and irregular deformation. The flow of the high-speed on-off valve is also hard to simulate, adding to the difficulty in system control. Many attempts have been made to overcome the difficulty. For instance, Jouppila et al. [5] designed a full-state observer based on the smooth variable structure filter (SVSF) and the sliding mode control (SMC), which regulates the PAM position via the SMC, and verified the robustness of the observer in controlling the PAM stretching Design, Modeling and Control of Bionic Knee in Artificial Leg 735 system for pulling reciprocating masses. Using hysteresis compensation, Vo-Minh et al. [12] improved the control precision with two closed loops for feedforward compensation: the inner loop compensates for the nonlinear pressure within the PAM, while the outer loop makes up for the nonlinear dynamics of the PAM. Chen and Ushijima et al. from Tokyo University of Science [1] improved the precision of the PAM model based on Chou’s theoretical model [2], but the improved model is too complex to applied in actual control. In this paper, a PAM feature testing platform is constructed, following the PAM modelling theories proposed by Shaofei Wang from Tokyo University of Technology [14], Shameek Ganguly from Indian Institute of Technology [3] and many other scholars [13, 22]. Then, the author fitted the test data by polynomial function, and created a desirable static model for the PAMs. Considering the actual control scenarios, two opposite pulse-width modulation (PWM) signals were applied simultaneously on the high-speed on-off valve bank, respectively acting on the on- off valves of the two PAMs. On this basis, a valve port flow model was established, in light of Sanville’s valve flow formula [9]. After that, a proportional-integral-derivative (PID) closed loop controller was designed, referring to the Lagrangian-Eulerian kinetics equation of the knee. Finally, the position control of the four-link bionic knee was achieved successfully through a simulation on MATLAB Simulink. 2 Design of bionic knee on the artificial leg The human skeleton is a masterpiece of evolution. It is the most suitable biological mech- anism for walking on both legs. The knee, a critical joint in two-legged walking, mainly encom- passes the medial and lateral condyles of the femur, the tibia, the meniscus, cruciate ligaments, muscles and nerves [?,20]. The cruciate ligaments refer to the anterior cruciate ligament (ACL) and posterior cruciate ligament (PCL) of knee joint. As shown in Figure 2, the interface between the lower end of the femur and the meniscus, and that between the meniscus and the upper end of the tibia, are both irregular in shape. During walking, both rolling and sliding motions occur on the two interfaces. Figure 2: Structure of human knee In flexion and extension, the horizontal axis of the knee is not fixed, and the ICR trajectory is in the form of a J-shape curve. The ICR motion adjusts the torque of the ground reaction force to the knee, and affects the knee’s following of hip motion, exerting a direct impact on the walking stability and energy consumption. Therefore, whether the ICR trajectory exists in J-shape is an important criterion to evaluate the design of bionic knee. The single-axis bionic knee is highly flexible, but lacks stability. Meanwhile, the four-link bionic knee can output a J-shape ICR trajectory, and ensure the motion flexibility and stability. The ICR trajectory enables the artificial leg to have a higher height from the ground and better 736 H.L. Xie, Y. Xie, F. Li obstacle avoidance ability during swing phase. In addition, the ICR trajectory allows the artificial leg to effectively use the ground reaction to maintain stability during support phase [6]. This explains the popularity of the four-link mechanism in the design of intelligent prothesis. In view of the human knee mechanism, three plans were prepared for the design of bionic knee on the artificial leg (Figure 3). In the first plan, the artificial leg takes up too much space, which may interfere in the motion of the bionic leg. Thus, this plan was abandoned. Despite the rational space arrangement, the second plan has a common defect with the first plan: excessively long PAMs are required for the bionic knee to complete the normal gait (at least 0∼90◦)); the PAMs, coupled with the driving chain, will not match the length of the thigh. Hence, the second plan was also discarded. The third plan was formulated based on these two plans. In the third plan, a multiplying wheel (gear ratio: 2.5) was introduced to increase the knee rotation angle per unit of PAMs’contraction length and effectively reduce the length of PAM. In addition, the third plan increases the transverse distance between the two PAMS, effectively avoiding interference caused by the inflation of PAMS. (a) First plan (b) Second plan (c) Third plan Figure 3: Design plans for bionic knee on the artificial leg 3 Motion analysis and dynamic modeling of knee joint 3.1 Analysis of the four-link mechanism The ICR trajectory is the key criterion to evaluate the bionic performance of the four- link mechanism. Therefore, the analysis of the four-link mechanism focuses on two issues: the correspondence between the rotation angle of the knee (the angle between the thigh and the shank) and that of the chain wheel, and the ICR trajectory. For convenience, a Cartesian coordinate system was set up as in Figure 4(b), where the origin O lies at the center of the driving shaft. According to the closed chain vector equation of the four-link mechanism, the links must satisfy the following constraint: l1e iθ1 + l2e iθ2 − l3eiθ3 − l4 = 0 (1) where θi is the rotation angle of the linkage i; li(i=1,2, . . . , 4) is linkage length of the four- link bionic knee; θ is the rotation angle of the chain wheel on the transmission chain; ϕ is the rotation angle of the bionic knee; α and β are initial values of θ1 and θ2; θ1 = α−λθ, θ2 = ϕ+β. The rotation angle of the bionic knee can be computed by the two constants by: Design, Modeling and Control of Bionic Knee in Artificial Leg 737 ϕ = 2 arctan ( a± √ a2 + b2 − c2 b− c ) −β (2) where a = −2l1l2 sin(α−λθ); b = 2l2 (l1 cos(α−λθ) − l4); c = l21 +l 2 2 −l 2 3 +l 2 4 −2l1l4 sin(α− λθ). (a) Knee joint model (b) Knee joint diagram Figure 4: Structure of the bionic knee on the artificial leg According to Kennedy’s theorem, the ICR of the links, the shank and the load lies in the intersection between the extension lines of rockers 1 and 3. Thus, the value of the ICR can be derived from the slopes of the extension lines. The coordinates of each point were solved in light of the coordinate system in Figure 4. Next, the ICR trajectory of the four-link mechanism was drawn using the plot commands in MATLAB. As shown in Figure 5, the obtained ICR trajectory was obviously a J-shape curve. Figure 5: ICR trajectory of the bionic knee 3.2 Kinetics modelling of the bionic knee on the artificial leg The movement analysis diagram of artificial leg is shown in Figure 6. The bionic knee on the artificial leg is a single-degree of freedom (1 DOF) system. Based on the coordinate system in Figure 6, the kinetics equation of the system was established by the Lagrangian-Eulerian method as: 738 H.L. Xie, Y. Xie, F. Li L = K −E = 3∑ i=1 ( 1 2 mi ( ẋ2i + ẏ 2 i )) + 3∑ i=1 ( 1 2 Jiθ̇ 2 i ) − 3∑ i=1 (migli · ξ (θi)) (3) where K is the kinetic energy term; E is the potential energy term; θi are the rotation angles of rocker 1, rocker 3, the shank (connected to link 2) and the load on the ankle; ξ (θi) is the vertical motion component; Ji is the equivalent moment of inertia; mi is the equivalent mass; (xi,yi) are the centroid coordinates of each link. Figure 6: Movement analysis diagram of artificial leg The kinetic equation of knee joint of artificial leg can be written as: T = d dt ( ∂L ∂θ̇2 ) − ∂L ∂θ2 = [ 1 3 m2l 2 2 + 1 2 m2l2lϑ sin (θ2 + ϑ1) + 1 2 m2l1l2 cos θ2 + 1 2 m3 ( l2 + D 2 )2 1 2 m3 ( l2 + D 2 ) lϑ sin (θ2 + ϑ1) + 1 2 m3l1 ( l2 + D 2 ) cos θ2 + 1 4 m3D 2 ] θ̈1 + [ 1 3 m2l 2 2 + 1 4 m3 ( l2 + D 2 )2 + 1 4 m3D 2 ] θ̈2 + [ −1 2 m2l2lϑ cos (θ2 + ϑ1) + 1 2 m2l1l2 sin θ2 −1 2 m3 ( l2 + D 2 ) lϑ cos (θ2 + ϑ1) + 1 2 m3l1 ( l2 + D 2 ) sin θ2 ] θ̇21 + 1 2 m2gl2 sin (θ1 + θ2) + m3g ( l2 + D 2 ) sin (θ1 + θ2) = M21θ̈1 + M22θ̈2 + C21θ̇ 2 1 + G2 (4) where ϑ1 = π6 and ϑ2 = π 3 are transformation angles of coordinate system; lϑ is coordinate offset; D is equivalent cylinder diameter of load; M21 is coupling inertia of the knee joint; M22 is effective inertia of shank and load; C21 is centripetal acceleration coefficient; G2 is gravity item of shank and load. During the calculation, the masses of rockers 1 and 3 were neglected, for they are much smaller than the loads on the shank, the ankle and the artificial foot. Then, the Lagrangian- Eulerian equation can be simplified as: Design, Modeling and Control of Bionic Knee in Artificial Leg 739 T = d dt ( ∂L ∂q̇ ) − ∂L ∂q = M(q)q̈ + G(q) = (FA −FB) r (5) where q is generalized coordinate vector; FA and FB are the output forces of extensor and flexor PAMs, respectively; r is the reference radius of the chain wheel. 4 Experimental modeling of the PAMs Due to a series of nonlinear factors, such as elastic deformation of rubber tube, friction between woven mesh and gas compression, the modeling of the PAMs is very difficult. Firstly, the static characteristics modeling of PAMs is established by experiment. Then, by referring to the Sanville flow formula, the functional relationship between the gas mass flow of the PAMs and the PWM signal is analyzed, and then the dynamic equation of PAM charging and discharging is solved. 4.1 Static characteristics modeling of PAMs In our design, the bionic knee is driven by two PAMs, which works similar to a spring with variable stiffness. When the PAM is inflated, the diameter increases and the length is shortened, outputting an axial tensile force. It is obvious that the output force F of the PAMs depends on the internal pressure P and the shrinkage ratio ε. Currently, the PAMs are usually modelled based on their stress-induced deformation, using the law of conservation of energy. However, this modelling approach is relatively complex, and inconvenient in actual application. To solve the problem, this paper establishes a PAM testing platform (Figure 7) to disclose the isobaric and isometric features of the PAMs, and sets up the PAM model based on the test results. The workflow of the isobaric and isometric test is presented in Figure 8. The bionic knee on the artificial leg uses the MAS-20-100N-AA-MC PAMs (Festo AG, Germany), whose initial length l0 is 100mm and the maximum shrinkage ratio is 20∼ 25% (no pressure, no load). Figure 7: PAM feature testing platform With the aid of the Curve Fitting toolbox of MATLAB, the data of the isobaric and isometric test were fitted by the least squares method, using the polynomial function. The fitting results can be expressed as: F = P (a0 + a1ε) + a2ε 3 + a3ε 2 + a4ε + a5 (6) where ai is the polynomial coefficient and its value is shown in Table 1. 740 H.L. Xie, Y. Xie, F. Li Table 1: Parameters value of ai a0 a1 a2 a3 a4 a5 2314 -7455 -151900 56710 -6699 -70.64 Figure 8: Workflow of isobaric and isometric test According to formula (6), the relationship of PAM output force F with internal pressure P and shrinkage rate ε is shown in Figure 9. The contour shows the function relationship between internal pressure P and shrinkage ε under different loads. Figure 9: Fitting model of PAM The comparison of PAM fitting value with isobaric and isometric experimental value is shown in Figure 10 and 11. It can be known that the experimental modeling method can accurately express the static characteristics of PAM, which is simpler than analytical modeling method and can be used for simulation and controller design. Design, Modeling and Control of Bionic Knee in Artificial Leg 741 Figure 10: Comparison of fitting value and isobaric experimental value of PAM Figure 11: Comparison of fitting value and isometric experimental value of PAM 4.2 Dynamic characteristics modeling of PAMs The charging and discharging process of PAMs is realized by controlling the valve port flow of a group of high-speed on-off valves through pulse width modulation (PWM) signal. In the process of dynamic characteristics modeling of PAMs, it is assumed that the whole pneumatic system is in an ideal state. The pressure change rate Ṗ of the PAMs can be illustrated as: Ṗ = γRTṁ V − γPV̇ V (7) where ṁ is the mass flow at the valve port; R is the ideal gas constant; γ is the isentropic index (γ=1.4 for the air); T is the thermodynamic temperature of the gas; V is the internal volume, which is approximately linear with the shrinkage ratio. In this paper, charging and discharging experiments were carried out on the PAMs under no load. The working diagram of PAM is shown in Figure 12. The variation of its internal volume was obtained by actual test, as shown in Figure 13. The internal volume was approximately proportional to the shrinkage rate, and the test data was approximately fitted by a linear curve, that is: V = b1ε + b2 (8) Where b1 and b2 are the fitting parameters, b1 = 1.9e− 4, b2 = 3.21e− 5. Figure 12: Charging and discharging processes of the high-speed on-off valve Based on Sanville’s valve flow formula, the total valve port flow of a single PAM under simultaneous charging and discharging can be established as: 742 H.L. Xie, Y. Xie, F. Li ṁ = ṁin (Ain,P,µ) − ṁout (Aout,P, 1 −µ) =   µPupΓ1 − (1 −µ)PΓ2 P < 0.189 µPupΓ1 − (1 −µ)PΓ1 0.189 ≤ P ≤ 0.317 µPupΓ3 − (1 −µ)PΓ1 P > 0.317 (9) where Γ1 = Amax√ RT √ γ ( 2 γ+1 )γ+1 γ−1 , Γ2 = Amax√ RT √ 2γ γ−1 [( Patm P )2 γ − ( Patm P )γ+1 γ ] , Γ3 = Amax√ RT √ 2γ γ−1 [( P Pup )2 γ − ( P Pup )γ+1 γ ] ; Pup is the stabilized pressure outputted by the air pump, Pup=0.6MPa; Patm is the atmospheric pressure, Patm=0.1MPa; Amax is the maximum opening area of the valve. Figure 13: Relationship between internal volume and shrinkage rate of PAMs The simulation results of the gas mass flow model inside a single PAM are shown in Figure 14. Through lateral comparison and analysis, with the increase of internal pressure, the gas flow of the charging valve port becomes smaller and smaller, while the gas flow of the discharging valve port increases. Through longitudinal comparison and analysis, the gas flow of the charging valve port increases and the discharging valve port decreases when the duty ratio of PWM signal is increased. The value of gas mass flow is consistent with the rated value 100L/min of high-speed switching valve, indicating that the modeling of gas mass flow inside PAM is correct. Figure 14: Valve port flow of PAM To sum up, the function relationship between internal pressure of PAMs and PWM signal can be described as: Design, Modeling and Control of Bionic Knee in Artificial Leg 743   PA = ∫ ( µA,PA,θ, θ̇ )∣∣∣ PA0=0.1MPa PB = ∫ ( µB,PB,θ, θ̇ )∣∣∣ PB0=0.6MPa (10) Assuming that the internal volume of PAM is fixed at the initial value, the change curve of the internal pressure of PAM A and B with duty ratio of PWM signal can be obtained, as shown in Figure 15. As can be seen from the figure, when the duty ratio is equal to 0.9, the PAM reaches a stable pressure value at a faster rate, and the stable value is roughly the same as the upstream pressure source of 0.6 MPa. On the contrary, the stable pressure value of the PAM is similar to the atmospheric pressure of 0.1 MPa. Thus by adjusting the duty ratio of PWM signal, the control of internal pressure value and charging and discharging rate of PAM is realized. (a) Internal pressure change of PAM A (b) Internal pressure change of PAM B Figure 15: Change curve of the internal pressure of PAMs 5 Control simulation and analysis 5.1 Simulation based on PID control The PID control is one of the most popular automatic control strategies. Besides strong robustness and adaptability, the PID control operates on a simple philosophy: adjusting the system response through proportional, integral and derivative corrections of error. The design of a PID controller does not require the solving of an accurate mathematical model of the object. The functional relationship between the rotation angle of the chain wheel and the shrinkage ratio of the PAMs can be described as:{ εA = θ ·r/l0 εB = ε0 −θ ·r/l0 (11) where ε0 = 0.2 is the preload shrinkage ratio of the PAM B. By combining equations (6), (10) and (11), the functional relationship between the output force of PAM and the PWM signal can be obtained:  FA = fA ( µA,θ, θ̇ ) FB = fB ( µB,θ, θ̇ ) (12) 744 H.L. Xie, Y. Xie, F. Li Based on the solution of the dynamic equation of the artificial leg and the motion analysis of the four-bar knee joint, the functional relationship between the knee torque and the rotation angle of the chain wheel can be obtained: T = M21θθ̈1 + M22θθ̈ + C21θθ̇ 2 1 + G2θ (θ1,θ) = FA ( µB,θ, θ̇ ) ·r −FB ( µB,θ, θ̇ ) ·r (13) In order to simplify the control simulation, during the control of the knee joint, fix the hip joint, i.e. θ1 = 0, equations (13) can be converted into the general form: θ̈ = 1 M22θ [ FA ( µA,θ, θ̇ ) ·r −FB ( µB,θ, θ̇ ) ·r −G2θ(θ) ] (14) The PID control law and transfer function can be respectively expressed as: u(t) = Kp ( e(t) + 1 Ti ∫ t 0 e(t)dt + Td de(t) dt ) (15) G(s) = U(s) E(s) = Kp ( 1 + 1 Tis + Tds ) (16) where Kp, Ki = Kp/Ti and Kd = Kp×Td are the gain parameters of the proportional, integral and derivative operations, respectively; Ti and Td are the time constants of the integral and derivative operations, respectively. The PID controller for the bionic knee with valve signal is presented in Figure 16. The block “Knee - Sprocket”is a switch from knee angle to sprocket angle and the block “Sprocket - Knee”is a switch from sprocket angle to knee angle. The block “Model of Knee”represents the knee dynamics model of the artificial leg. For PAM B, PWM signal contrary to ideal angle information is given, and PWM signal duty ratio of PAM A is adjusted by PID controller. The angle information of sprocket is collected by the encoder for feedback, which is used for solution of control error. Figure 16: Structure of the PID controller of the bionic knee To verify the four-link bionic knee and the model of the PAMs driving mode, a simulation model was set up on MATLAB Simulink, and adopted to simulate how the bionic knee followed the ideal trajectories under irregular square wave signal and sinusoidal signal, respectively. The PID controller parameters were configured through trial and error: Kp = 3.9; Ki = 5.88; Kd = 2.05; N (differential filter coefficient) = 100. Considering the actual response time of high- speed on-off valve under continuous working mode ((< 0.2ms)), the step length was fixed at 0.01s; the duty cycle range of the PWM control signal was set to 0.12∼ 0.88; the integrator output range of the internal pressure of the PAMs was set to 0.1∼ 0.6MPa; the initial pressure of Design, Modeling and Control of Bionic Knee in Artificial Leg 745 the two PAMs were set to PA = 0.1Mpa and PB = 0.6Mpa, respectively. The simulation results are shown in Figures 17 ∼ 22. Figure 17: Following curve under irregular square wave signal Figure 18: Angle error under irregular square wave signal Figure 19: Internal pressure variation under irregular square wave signal As shown in Figures 17 ∼ 19, under the PID control, the different positions of the bionic knee rotated quickly by the required angles, following the ideal trajectory under irregular square wave signal, and the internal pressure of the PAMs changed between 0.1 and 0.6MPa. Thus, the PID controller can satisfy the requirements for actual application. As shown in Figures 20∼ 22, for the sinusoidal signal, the bionic knee can achieve ideal follow on the whole under the PID control, but the tracking error was about 0.06 rad. It can be seen that the PID controller basically meets the control requirements for the linear system, but has little capacity for the nonlinear system. Due to the strong nonlinear of the electric-pneumatic system of the knee joint, the design of nonlinear controller needs to be considered. 746 H.L. Xie, Y. Xie, F. Li Figure 20: Following curve under sinusoidal signal Figure 21: Angle error under sinusoidal signal Figure 22: Internal pressure variation under sinusoidal signal 5.2 Simulation based on sliding mode control Sliding mode control is essentially a nonlinear control. Compared with other control meth- ods, the structure of the sliding mode control system is not fixed and purposefully changing according to the current state of the system (such as deviation) during the dynamic process, forcing the system to move in accordance with the predetermined sliding mode state trajectory. This method has the advantages of rapid response and insensitivity to parameter change and disturbance, and is suitable for the control of electric-pneumatic system of bionic knee joint. Considering that the bionic knee system of artificial leg is a second-order equation about angle θ of sprocket wheel, the designed sliding mode function is: s(t) = λ1e + ė (17) where λ1 > 0 and meets Hurwitz conditions. The angle tracking error of the knee joint system is: e = θd −θ ė = θ̇d − θ̇ (18) Design, Modeling and Control of Bionic Knee in Artificial Leg 747 Where θd is the angle of sprocket wheel in ideal movement of knee joint. The derivative of the sliding mode function is: ṡ = λ1ė + ë = λ1 ( θ̇d − θ̇ ) + ( θ̈d − θ̈ ) (19) In order to ensure the stability of the control system of the knee joint, the motion points in the area around the sliding mode surface should eventually tend to the sliding mode surface s = 0. Therefore, Lyapunov function is defined as follows: V1 = 1 2 s2 (20) According to Lyapunov stability criterion, there should be: lim s→0 V̇1 = lim s→0 sṡ ≤ 0 (21) Weighing the approaching speed and stability of the control system, this paper adopts the exponential approaching law: ṡ = −δ1 · sign(s) −δ2s δ1 > 0 δ2 > 0 (22) Exponential term −δ2s can guarantee that the system state can approach the sliding mode with a large speed when s is large. However, when s is small, its approach speed is slow and cannot guarantee to arrive in a finite time. Therefore, an isokinetic approach term −δ1 · sign(s) is added. Combined with the knee system model of artificial leg, the sliding mode controller based on the approach law is obtained: FA ( µA,θ, θ̇ ) = M22θ r ( λ1 ( θ̇d − θ̇ ) + (δ1 · sign(s) + δ2s) + θ̈d ) + G2θ(θ) r + FB ( µB,θ, θ̇ ) = PA ( µA, θ̇,θ ) ·κA1(θ) + κA2(θ) (23) Where κA1 and κA2 are polynomials about shrinkage in the static model of PAM. According to the charging and discharging dynamic model of PAM, and combining the functional relationship between the angle of sprocket wheel and the shrinkage rate of PAM, the functional relationship between the internal pressure PA of flexor and the duty ratio µA of PWM, the control signal of high-speed switching valve group, is established. µA =   V +PAΓ2A PupΓ1A+PAΓ2A PA < 0.189 V +PAΓ1A PupΓ1A+PAΓ1A 0.189 ≤ PA ≤ 0.317 V +PAΓ1A Γ3A+PAΓ1A PA > 0.317 (24) where V = V ṖA+γPAV̇ γAmax √ RT , Γ1A = √ γ · ( 2 γ+1 )γ+1 γ−1 , Γ2A = √ 2γ γ−1 · [( Patm PA )2 γ − ( Patm PA )γ+1 γ ] and Γ3A = √ 2γ γ−1 · [( PA Pup )2 γ − ( PA Pup )γ+1 γ ] . The simulation system of artificial knee joint based on sliding mode control is shown in Figure 23. In the simulation process, the step size setting is consistent with the PID simulation. λ1 = 8, δ1 = 5.88, , δ2 = 2.05 and the setting range of duty cycle output of high-speed switching 748 H.L. Xie, Y. Xie, F. Li valve is 0.12∼0.88. The initial values of internal pressure inside the PAM is also set as PA= 0.1 MPa and PB= 0.6 MPa. The simulation results are shown in Figures 24∼31. It can be seen from Figures 24∼26 that, for irregular square wave signals, the sliding mode control system can achieve better tracking, with smaller error and faster response time than the PID controller. The internal pressure of the PAM varies within 0.1∼0.6 MPa and is reasonable. It can be seen from Figures 27 and 29 that, for the trajectory curve of sinusoidal signal, the sliding mode controller can achieve ideal following, with the error range controlled within 0.03 rad and a fast response time, which fully meets the precision requirements of knee motion control. As shown in Figures 30∼31, the sliding mode controller can realize the ideal following of human normal gait, which proves the correctness of the structure design and system modeling in this paper. Figure 23: Simulation system of artificial knee joint based on sliding mode control Figure 24: Following curve under irregular square wave signal Figure 25: Angle error under irregular square wave signal Design, Modeling and Control of Bionic Knee in Artificial Leg 749 Figure 26: Internal pressure variation under irregular square wave signal Figure 27: Following curve under sinusoidal signal Figure 28: Angle error under sinusoidal signal Figure 29: The internal pressure variation under sinusoidal signal 750 H.L. Xie, Y. Xie, F. Li Figure 30: Following curve under human normal gait Figure 31: Angle error under human normal gait 6 Conclusions In this paper, the authors propose a new prosthesis platform and design a bionic artificial leg that simulates the healthy leg of human body. Based on the analysis of human knee motion, this paper designs a four-link bionic knee, and simulates the flexor and extensor muscles as two PAMs. The two PAMs move in opposite direction, driving the knee motions in the artificial leg. In this way, the artificial leg can move similarly to a human leg. After testing the PAM features, a static model was developed for the PAMs based on the test results, using the least squares method. Based on Sanville’s valve flow formula, a dynamic model was constructed for the total valve port flow of each PAM under simultaneous charging and discharging. Finally, the PID closed loop controller and sliding mode controller were designed for the bionic knee. The simulation results show that compared with the PID closed-loop controller, the sliding mode controller can significantly improve ideal track following effect and realize the ideal track following of the human normal gait, which indicates the correctness of the structural design and system modeling in this paper. Acknowledgment Financial supports from the Fundamental Research Funds for the Central Universities (ID N170313025) and Scientific Study Project of Liaoning Province Education Department (ID LQGD2017029) are highly appreciated. Design, Modeling and Control of Bionic Knee in Artificial Leg 751 Bibliography [1] Chen, D.H.; Ushijima, K. (2013); Prediction of the mechanical performance of mcKibben artificial muscle actuator, International Journal of Mechanical Science, 78(1), 183-192, 2013. [2] Chou, C.P.; Hannaford, B. (1996); Measurement and modeling of mcKibben pneumatic artificial muscles, IEEE Transactions on Robotics and Automation, 12(1), 90-102, 1996. [3] Ganguly, S.; Garg, A.; Pasricha, A.; Dwivedy, S.K. (2012); Control of pneumatic artificial muscle system through experimental modelingm, Mechatronics, 22(8), 1135-1147, 2012. [4] Gong, S.Y.; Yang, P.; Song, L.; Chen, L.L. (2011); Simulation of swing phase dynamics in trans-femoral prostheses based on MATLAB, Journal of Hebei University of Technology, 40(2), 6-9, 2011. [5] Jouppila, V.; Gadsden, S.A.; Ellman, A. (2014); Experimental comparisons of sliding mode controlled pneumatic muscle and cylinder actuators, Journal of Dynamic Systems Measurement&Control, 136(4), 543-552, 2014. [6] Pandit, S.; Godiyal, A.K.; Vimal, A.K.; Singh, U.; Joshi, D.; Kalyanasundaram, D. (2018); An affordable insole-sensor-based trans-femoral prosthesis for normal gait, Sensors, 18(3), 2018. [7] Pillai, M.V.; Kazerooni, H.; Hurwich, A. (2001); Design of a semi-active knee-ankle Pros- thesis, Proceedings of IEEE International Conference on Robotics and Automation,IEEE, Shanghai, China, 5293-5300, 2001. [8] Radcliffe, C.W. (2003); Biomechanics of knee stability control with four-bar prosthetic knees, ISPO Australia Annual Meeting, 2003. [9] Sanville, F.E. (1971); Van Brussel, H. (1971); New method of specifying the flow capacity of pneumatic fluid power valves, Hydraulic Pneumatic, 17(195), 120-126, 1971. [10] Su, B.Y.; Wang, J.; Liu, S.Q.; Sheng, M.; Jiang, J.; Xiang,K. (2019); A CNN-Based Method for Intent Recognition Using Inertial Measurement Units and Intelligent Lower Limb Pros- thesis, IEEE Transactions on Neural Systems and Rehabilitation Engineering, 27(5), 1032- 1042, 2019. [11] Tian, H.; Ma, L.; Zhu, X.; Dang, X. (2019); Grinding method, trajectory planning and simulation of a 3 DOF knee grinding robot, International Journal of Simulation Modelling, 18(1), 150-162, 2019. [12] Vo-Minh, T.; Tjahjowidodo, T.; Ramon, H.; Van Brussel, H. (2011); A new approach to modeling hysteresis in a pneumatic artificial muscle using the maxwell-slip model, IEEE/ASME Transactions on Mechatronics, 16(1), 177-186, 2011. [13] Vo-Minh, T.; Tjahjowidodo, T.; Ramon, H.; Van Brussel, H. (2010); Cascade position control of a single pneumatic artificial muscle-mass system with hysteresis compensation, Mechatronic, 20(3), 402-414, 2010. [14] Wang, S.F., Sato, K.; Kagawa, T. (2014); Precise positioning of pneumatic artificial muscle systems, Journal of Flow Control, Measurement&Visualization, 2(4), 138-153, 2014. 752 H.L. Xie, Y. Xie, F. Li [15] Xie, H.L.; Chen, K.L.; Li, F. (2015) ; Bionic artificial leg design and control simulation based on fuzzy PID control algorithm, Proceedings of IEEE International Conference on Cyber Technology in Automation, Control and Intelligent Systems, IEEE, Shenyang, China, 2097-2102, 2015. [16] Xie, H.L.; He, N.; Li, F.; ieYang, J.Y. (2015); The bionic design and system identification of intelligent bionic leg with magneto-rheological damper, Tehnicki Vjesnik,, 22(5), 1093-1098, 2015. [17] Xie, H.L.; Liang, Z.Z.; Li, F.; Guo, L.X. (2010); The Knee Joint Design and Control of above Knee Intelligent Bionic Leg Based on Magneto-rheological Damper, International Journal of Automation and Computing, 7(3), 277-282, 2010. [18] Xie, H.L.; Liu, Z.B.; Yang, J.Y. (2016); Modelling of Magnetorheological Damper for Intel- ligent Bionic Leg and Simulation of Knee Joint Movement Control, International Journal of Simulation Modelling, 15(1), 144-156, 2016 [19] Young, A.; Hargrove, L. (2016); A classification method for userindependent intent recog- nition for transfemoral amputees using powered lower limb prostheses, IEEE Transactions on Neural Systems and Rehabilitation Engineering, 24(2), 217-225, 2016. [20] Zhang, X.F.; Fu, H.Q.; Wang, X.T.; Li, G.L.; Yang, R.; Liu, Y. (2016); Design of a novel bionic prosthetic knee joint, Assembly Automation, 36(4), 398-404, 2016. [21] Zhang, Z.H.; Hu, C. (2015); Multi-model stability control method of underactuated biped robots based on imbalance degrees, International Journal of Simulation Modelling,14(4), 647-657, 2015. [22] Zhu, J.M.; Huang, C.Y.; Lei, J.T.; Qi, B.C. (2017); Position/Stiffness Control of Antagonis- tic Bionic Joint Driven by Pneumatic Muscles Actuators, Journal of Mechanical Engineering, 53(13), 64-74, 2017.