Modelling, Simulation and Control of the Walking of Biped Robotic Devices—Part I : Modelling and Simulation Using Autolev
Abstract
:1. Introduction
- the need to build an hybrid system switching among several phases;
- obtaining from the non-linear dynamical equations matrices of the linearized model to be used for designing a (linear) control;
- deriving explicitly computer code for the expressions of Jacobians matrices, kinematics, and in general of mechanical quantities needed for analysis and then to be embedded in the control;
- obtaining from the ground constraint the theoretical expressions of reaction forces/torques on the feet needed to evaluate the postural equilibrium, to balance the weight and offer compliance to the swing foot in the contact with the ground.
2. Hybrid Complementarity Dynamical Systems
3. A Biped Robot
3.1. Mechanical Modelling
3.2. Robot Configuration
- The three positions on space of a reference point of , were reaction forces are applied, taken at the center of the toe: .
- The two angles of the frame of foot 1: .
- The joint angles (as depicted in Figure 1): , ,, , , , , , , , and .
3.3. Unilateral Constraint and Collision
3.4. The Stride in a Gait Cycle
4. Building the Simulator
4.1. The Autolev Symbolic Computation
- the non-holonomic constraints on the generalized speeds (see Equation (12));
- the selected dependent generalized speeds;
- forces and torques, in the previous declaration, resulting from the constraints, therefore, not to be considered as external input, but internally derived by the simulator.
4.1.1. The Generated Code
4.2. The Object Oriented Composition of the Program
4.2.1. The Main Class
The Preview
The Control
5. Conclusions
Acknowledgments
Author Contributions
Conflicts of Interest
Appendix A. Code Fragments
% Declaration of the configuration variables Variables xthetaAnkle1’, ythetaAnkle1’, ythetaAnkle1’, ythetaAnkle2’, zthetaAnkle1’,zthetaAnkle2’,thetaKnee1’,thetaKnee2’, xthetaHip1’, xthetaHip2’, ythetaHip1’, ythetaHip2’, xthetaFoot1’, ythetaFoot1’, xFoot1’, yFoot1’,zFoot1’ % Declaration of the motion variables MotionVariables’ uxAnkle1’, uxAnkle2’, uyAnkley1’, uyAnkley2’, uzAnklez1’, uzAnklez2’, uKnee1’, uKnee2’, uxHip1’’, uxHip2’, uyHipy1’,uyHipy2’, uxFoot1’,uyFoot1’,vxFoot1’,vyFoot1’, vzFoot1’ % Declaration of the vector of reaction forces/torques to be computed % and returned by by Autolev Zee_Not = [FxFoot1; FyFoot1; FzFoot1; TxFoot1; TzAnkle1; TxAnkle2; TzAnkle2] % Command that generates the Kane dynamical equations % Zero is the vector contianing the differential equations eq. (11) Zero = Fr() + FrStar() % Command that resolves nonholonomic constraints: % it generates the reduced order dynamical equations % and returns the reaction forces/torques Kane(Zee_Not) % The COG coordinates: cm returns the COG vector % dot performs the scalar product of the vector with the x,y and z axis cogx = dot(cm(No,foot1,foot2,leg1,Thigh1,leg2,Thigh2,Hat),N1>) cogy = dot(cm(No,foot1,foot2,leg1,Thigh1,leg2,Thigh2,Hat),N2>) cogz = dot(cm(No,foot1,foot2,leg1,Thigh1,leg2,Thigh2,Hat),N3>) % The time derivatives (Dt) of the COG coordinates are computed cogxp = Dt(cogx) cogyp = Dt(cogy) cogzp = Dt(cogz) % The vectors of the configuration variables, % of the generalized spees and accelerations are defined thetas = [thetayFoot1,thetayAnkle1,thetaKnee1,thetayHip1,thetayHip2,thetaKnee2 ,thetayAnkle2,thetaxAnkle2,thetaxHip1,thetaxHip2] u = [uyFoot1,uyAnkle1,uKnee1,uyHip1,uyHip2,uKnee2,uyAnkle2,uxAnkle1,uxHip1,uxHip2] up = [uyFoot1’,uyAnkle1’,uKnee1’,uyHip1’,uyHip2’,uKnee2’,uyAnkle2’,uxAnkle1’ ,uxHip1’,uxHip2’] % The vector of input joint torques is defined torques = [TyFoot1,TyAnkle1,TKnee1,TyHip1,TyHip2,TKnee2,TyAnkle2,TxAnkle1,TxHip1 ,TxHip2] % COG Jacobian has been computed making the partial derivatives (D) of COG velocity % with respect to the generalized speeds Jcog = D([cogxp;cogyp;cogzp],u) % The matrices of the linearized dynamical model are computed as partial derivatives % of the vector of the differential equations % the inertia matrix with respect to the accelerations IM = D(Zero,up) Zero0 = evaluate(Zero, u = 0, up = 0,torques = 0) % Linearization of gravitational forces with respect to the positions K = D(Zero0,thetas) % The input matrix with respect to the input joint torques B = D(Zero,torques) % The matrix of linear relationship between reactions forces/torques % with respect to inputs Jforce_torque = D(Zee_Not,torques) % The command partials returns the partial velocities of heel2 V = partials(V_Heel2_N>) % Momentum returns the angular momentum P = momentum(generalized)
-> (3077) ZERO[1] = Z2545 + Z2535*uxAnkle1’ + Z2536*uyAnkle1’ + Z2537*uyAnkle2’ + Z2538*uKnee1’ + Z2539*uKnee2’ + Z2540*uxHip1’ + Z2541*uxHip2’ + Z2542*uyHip1’ + Z2543*uyHip2’ + Z2544*uyFoot1’ (...) -> (3061) FzFoot1 = Z2405*uxAnkle1’ + Z2406*uyAnkle1’ + Z2407*uyAnkle2’ + Z2408*uKnee1’ + Z2409*uKnee2’+ Z2410*uxHip1’ + Z2411*uxHip2’ + Z2412*uyHip1’+ Z2413*uyHip2’ + Z2414*uyFoot1’ - Z2472
singleStance.readInit("singleStance.in"); doubleStance.readInit("doubleStance.in"); currentModel = &doubleStance; int mode = currentModel->getMode(); currentTime = currentModel->getTime(); samplingTime = currentModel->getSamplingTime(); control.setSamplingTime(samplingTime); currentModel->init(currentModel->getState(), mode); control.init(currentModel->getState(), mode, preview.reference(currentTime) , currentModel->getPhase()); Vector modelInput = control.output(); currentModel->derivative(modelInput); currentModel->output(); //print initial values while(currentTime < Tend) { currentModel->runga_kutta(modelInput,currentTime); currentTime = currentModel->getTime(); if(stateMachine(currentTime)) // sense events of heel_strike and toe_off { Vector state = currentModel->getState(); int mode = currentModel->getMode(); if (currentModel == &singleStance) { currentModel = &doubleStance; currentModel->init(state,mode); } else { currentModel = &singleStance; currentModel->init(state,mode *= -1); } control.init(state, mode, preview.reference(currentTime) , currentModel->getPhase()); modelInput = control.output(); currentModel->derivative(modelInput); currentModel->output(); } else { Vector modelOutput = currentModel->output(); control.next(modelOutput, preview.reference(currentTime)); modelInput = control.output(); } }
ForcezFoot1 = z[2405]*uAnkle1p + z[2406]*uAnkley1p + z[2407]*uAnkley2p + z[2408]*uKnee1p + z[2409]*uKnee2p + z[2410]*uHip1p + z[2411]*uHip2p + z[2412]*uHipy1p + z[2413]*uHipy2p + z[2414]*uFooty1p - z[2472];
References
- Menga, G. Team Isaac: Academic Research Project on Robotic Humanoids. Available online: http://www.isaacrobot.it/ (accessed on 17 March 2016).
- Menga, G.; Ghirardi, M. Lower Limb Exoskeleton with Postural Equilibrium Enhancement For Rehabilitation Purposes. Internal report DAUIN - Politecnico di Torino. 2015. Available online: https://dl.dropboxusercontent.com/u/26129003/SUBM1.pdf (accessed on 17 March 2016).
- MSC Software, MSC Adams Multibody Dynamics Simulation. Available online: http://www.mscsoftware.com/Products/CAE-Tools/Adams.aspx (accessed on 17 March 2016).
- Hurmuzlu, Y.; Genot, F.; Brogliato, B. Modeling, stability and control of biped robots—A general framework. Automatica 2004, 40, 1647–1664. [Google Scholar] [CrossRef]
- Heemels, W.P.M.H.; Brogliato, B. The complementarity class of hybrid dynamical systems. Eur. J. Control 2003, 9, 322–360. [Google Scholar] [CrossRef]
- Siciliano, B.; Oussama, K. Springer Handbook of Robotics; Springer: Berlin, Germany; Heidelberg, Germany, 2008. [Google Scholar]
- Kane, T.R.; Levinson, D.A. Dynamics: Theory and Applications; McGraw-Hill: New York, NY, USA, 1985. [Google Scholar]
- Gillespie, R.B. Kane’s equations for haptic display of multibody systems. Haptics-e 2003, 3, 144–158. Available online: http://www.haptics-e.org (accessed on 17 March 2016). [Google Scholar]
- Mitiguy, P. MotionGenesis: Advanced Solutions for Forces, Motion, And Code-Generation. Available online: http://www.motiongenesis.com/ (accessed on 17 March 2016).
- Azevedo, C.; Espiau, B.; Amblard, B.; Assaiante, C. Bipedal locomotion; toward a unified concept in robotics and neuroscience. Biol. Cybern. 2007, 96, 209–228. [Google Scholar] [CrossRef] [PubMed]
- Azevedo, C.; Amblard, B.; Espiau, B.; Assaiante, C. A Synthesis of Bipedal Locomotion in Human and Robots; Technical Report; Research Report 5450; INRIA: Sophie Antipolis Cedex, Nice Cedex, France, 2004; Available online: https://hal.inria.fr/inria-00070557 (accessed on 17 March 2016).
- Wieber, P. Constrained Stability and Parameterized Control. In Biped Walking, Proceedings of the International Symposium on Mathematical Theory of Networks and Systems, Perpignan, France, 19–23 June 2000.
- Wieber, P. On the Stability of Walking Systems. In Proceedings of the International Workshop on Humanoids and Human Friendly Robotics, Tsukuba, Japan, 11–12 December 2002.
- Kumar, R.; Handharu, N.; Jungwon, Y.; Gap-soon, K. Hybrid toe and heel joints for biped/humanoid robots for natural gait. In Proceedings of the International Conference on Control, Automation and Systems, Seoul, Korea, 17–20 October 2007.
- Ezati, M.; Toosi, K.; Khadiv, M.; Moosavian, S. Dynamics modeling of a biped robot with active toe joints. In Proceedings of the 2014 Second RSI/ISM International Conference on Robotics and Mechatronics, Tehran, Iran, 15–17 October 2014.
- Ezati, M.; Khadiv, M.; Akbar, M.S.A. Optimal gait planning for a biped robot by employing active toe joints and heels. Modares Mech. Eng. 2015, 15, 69–80. [Google Scholar]
- Bajodah, A.H.; Hodges, D.; Chen, Y. Nonminimal generalized Kane’s impulse-momentum relations. J. Guid. Control Dyn. 2004, 27, 1088–1092. [Google Scholar] [CrossRef]
- Ounpuu, S. The biomechanics of walking and running. Clin. Sports Med. 1994, 13, 843–863. [Google Scholar] [PubMed]
- Saunders, J.B.; Inman, V.T.; Eberhardt, H.D. The major determinants in normal and pathological gait. J. Bone Joint Surg. 1953, 35-A, 543–558. [Google Scholar] [PubMed]
- Patton, J. Normal Gait Part B of Kinesiology. Technical Report. 2002. Available online: http://www.smpp.northwestern.edu/˜jim/kinesiology/partB_GaitMechanics.ppt.pdf (accessed on 17 March 2016).
- Menga, G. G++ Programming Environment, SYCO. 2008. Available online: www.syco.it (accessed on 17 March 2016).
- Bahar, B.; Miskon, M.F.; Bakar, N.A.; Shukor, A.Z.; Ali, F. Path generation of sit to stand motion using humanoid robot. Aust. J. Basic Appl. Sci. 2014, 8, 168–182. [Google Scholar]
Motion | Constraints | Reactions | Position | Free |
---|---|---|---|---|
Variables | Control | Forces/Torques | ||
Motion | Constraints | Reactions | Position | Free |
---|---|---|---|---|
Variables | Control | Forces/Torques | ||
© 2016 by the authors; licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons by Attribution (CC-BY) license (http://creativecommons.org/licenses/by/4.0/).
Share and Cite
Menga, G.; Ghirardi, M. Modelling, Simulation and Control of the Walking of Biped Robotic Devices—Part I : Modelling and Simulation Using Autolev. Inventions 2016, 1, 6. https://doi.org/10.3390/inventions1010006
Menga G, Ghirardi M. Modelling, Simulation and Control of the Walking of Biped Robotic Devices—Part I : Modelling and Simulation Using Autolev. Inventions. 2016; 1(1):6. https://doi.org/10.3390/inventions1010006
Chicago/Turabian StyleMenga, Giuseppe, and Marco Ghirardi. 2016. "Modelling, Simulation and Control of the Walking of Biped Robotic Devices—Part I : Modelling and Simulation Using Autolev" Inventions 1, no. 1: 6. https://doi.org/10.3390/inventions1010006
APA StyleMenga, G., & Ghirardi, M. (2016). Modelling, Simulation and Control of the Walking of Biped Robotic Devices—Part I : Modelling and Simulation Using Autolev. Inventions, 1(1), 6. https://doi.org/10.3390/inventions1010006