3_chariot

Upload: ioan-doroftei

Post on 02-Jun-2018

214 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/10/2019 3_Chariot

    1/8

    9th National Congress on Theoretical and Applied Mechanics, Brussels, 9-10-11 May 2012

    Simulation framework of modular robots using EasyDyn

    Ir. Christophe Chariot1, Prof. Enrico Filippi2, Prof. Olivier Verlinden3

    1,2Department of Machine Design and Production Engineering, University of Mons, Faculty of Engineering

    Rue du Joncquois, 53, 7000 MONS - Belgium3Department of Theoretical Mechanics and Dynamics and Vibrations, University of Mons, Faculty of Engineering

    Boulevard Dolez 31, 7000 MONS - Belgium

    email: [email protected], [email protected], [email protected]

    Abstract This paper presents a multibody simulation

    framework developed to study the locomotion control of

    modular robots. The resulting model aims at featuring the

    main parts that characterize actual modular robots includ-

    ing kinematics, inertia properties, actuators and the associ-

    ated controllers. As the framework is dedicated to modular

    robots, we spend some time to describe its core element, the

    module, and the extend of its related model. We then show

    how we exploited this modular approach to quickly build

    a modular robot multibody model. Finally, we illustrate

    the application of the framework on two configurations : a

    caterpillar and a 6-legged robot.

    Keywords Multibody simulation, modular robots

    I. INTRODUCTION

    THE simulation framework presented in this papercomes within the scope of research about the loco-motion control of modular robots. More specifically, thestudy aims at defining generic control algorithms that lead

    to stable gaits on several robot configurations.

    The principle of modular robotics is to build a robot

    from elementary blocks called modules whose assembly

    defines the shape and functionalities of the structure. The

    modules are able to reorganize themselves so that they

    form an active structure that can adapt its shape in order

    to achieve a specific mission.

    A. Motivation

    Direct tests on prototypes would be specially time con-suming or could cause hardware damages. We therefore

    take benefit from multibody simulation to perform prelim-

    inary analyses in favourable conditions.

    In particular, we use the tool as virtual experiment en-

    gine to avoid the use of hardware that brings its own prob-

    lems or is simply unavailable. Simulations are also conve-

    nient to check the feasibility of a given gait with the actual

    robot specifications so that we can prevent possible hard-

    ware damage.

    Furthermore, working in simulated environments pro-

    vides complete and ideal instrumentation. During experi-ments, one can directly monitor any simulated variable or

    even integrate a sensor model to assess its performances.

    Similarly, we keep control on the experimental conditions

    so that the comparison between several runs is not sub-

    jected to random changes.

    Lets also notice that computational resources are par-

    ticularly convenient to run several tests in parallel and to

    automate parameters-dependent simulations as used in op-

    timization procedures.

    B. Approach

    A modular robot is an assembly of modules, which

    means that the global structure is a repetition of identical

    parts. A great interest of such architectures is that a new

    robot is simply a combination of existing building blocks

    so that there is no need to re-design the robot all over again.

    This principle can be extended to the related multibody

    model, we therefore have favoured a modular approach to

    build the model, based on a recurrent subsystem : the mod-

    ule. In the following, we thus detail the model of a single

    module (see section II) and describe the way we build the

    complete model from there in section III.

    This approach is convenient to quickly study the be-

    havior of a given control model on several configurations.

    This makes the establishement of a generic methodology

    easier, which is particularly relevant in the case of modular

    robots.

    I I . BAS E M ODEL

    In this paper, we present the framework applied to the

    M-Tran project developed at AIST in Japan. This sec-tion first presents this module and then details the different

    parts of the considered model.

    A. Module Description

    The mechanical design of the module defines its specific

    motion and interconnection abilities. In the case of the

    M-Tran (see schematic in figure 1), each module is built

    from three bodies, it has two controlled degrees of free-

    dom, six connection surfaces, it measures 65x65x130 mm

    and weighs 400 grams.

    As far as the kinematics is concerned, a central part, the

    link, has two rotational joints with parallel axes that link

    it to the blocks. Therefore, each of the latter, can execute

    1

  • 8/10/2019 3_Chariot

    2/8

    9th National Congress on Theoretical and Applied Mechanics, Brussels, 9-10-11 May 2012

    Fig. 1. Description of the M-Tran module from [1] : each

    module results from the assembly of two blocks on a

    central link. It features two rotational degrees of free-

    dom (dof) about two parallel axes with a full range of

    radians each

    rotations within a range of rad with respect to the central

    link.

    Several modules can connect to each other to create a

    modular robot thanks to the connection surfaces located

    on the blocks. Even though these blocks are geometrically

    identical, they have different functions when it comes to

    connections between modules. Indeed, one of the blocks

    is active, which means that it embeds active latch systems,

    and the other one is passive, that is to say it has specific

    surfaces on which the latch is able to grip. Therefore, only

    connections between active and passive blocks can be con-

    sidered and each of them has three connection surfaces so

    that a module features three active and three passive con-

    nection surfaces. Lets also note that the connection mech-

    anism only allows docking for relative orientations multi-

    ple of/2 radians so that there are four different connec-tion positions between two surfaces.

    The distance between the joint axes is half the module

    length so that modules can form a regular 3D grid with

    hinge values of 0,/2 and/2 radians.

    B. Extended Multibody Model

    The simulation framework mainly aims at studying lo-

    comotion control of modular robots by use of dynamics

    simulations. We have chosen to establish an extended

    multibody model that takes the various parts of the whole

    control loop into account, to be representative of an ac-

    tual robot. We therefore consider kinematics and inertia

    properties of the module as well as its actuators and their

    related position control loop. Consequently, the model in-

    puts are the joints desired positions, values that are pro-

    vided by the pattern generator of the locomotion algorithm(that part is covered later in section II-C). In this section,

    we first give an overview of the framework, we present the

    main tool EasyDyn and then we individually detail each

    part of the model.

    As depicted in figure 2, the joint angle of each controlled

    hinge (two per module) is compared to the value given

    by the locomotion algorithm so that the relative error is

    filtered by a PID controller. The latter outputs a voltage

    command that drives the motor whose electro-mechanical

    model computes the resulting torque to be applied on the

    related bodies.

    Fig. 2. Simulation model framework : each motor gener-

    ates a torque that is computed from its electrical and

    mechanical equations whose supply voltage is deter-

    mined by a PID position control loop.

    B.1 EasyDyn

    The framework is based on the EasyDyn simulation

    tool developed at the Department of Theoretical Mechan-

    ics, Dynamics and Vibrations of the University of Mons.

    EasyDyn is an open source C++ library which provides sev-

    eral modules to achieve multibody simulations (and more

    generally problems described by second order differential

    equations), that is to say :

    the tools to handle vector calculus ; routines for integration of second-order differential

    equations ;

    a front-end to build the equations of motion from kine-

    matics and applied efforts based on generalized coordi-

    nates ;

    scene definition of moving bodies for visualization.

    Besides theses C++ modules, EasyDyn also includes a

    MuPAD script that establishes the kinematics from the dif-

    ferentiation of position matrices.

    The library features several useful functions providing

    specific applied efforts like contacts, springs, dampers,tyres,...

    A great advantage ofEasyDyn is that the user always keeps

    control of his model that doesnt rely on black box routines

    and can thus be easily adapted to a specific situation. In

    our case, we take advantage of this by adding customized

    equations to extend the multibody model.

    B.2 Kinematics

    The multibody model is directly built from the module

    description and thus includes three bodies. As the mod-

    ular robot is defined by the relative connections betweenmodules, we similarly use the composition of motion to

    describe the relative motion of every body. So, the block

    that connects to a parent module (see section III for more

    2

  • 8/10/2019 3_Chariot

    3/8

    9th National Congress on Theoretical and Applied Mechanics, Brussels, 9-10-11 May 2012

    details) is considered as reference for the link motion and

    subsequently, the second block refers to the link. Each

    module has two degrees of freedom1, which means that

    we attribute two configuration parameters to each module

    that corresponds to the rotational joints.

    B.3 Actuator Model

    In multibody simulations, the contribution of actuators

    is included through applied forces and torques. In our case

    we compute the resulting torque of the electrical motors

    from their discretized electro-mechanical model2 so that

    the input signal is the motor voltageu :

    i = u KSn

    R(1)

    T = KTin (2)

    with :

    ithe current driven through the motor coil ;

    KSthe motor speed constant ;

    nthe gearbox reduction ratio ;

    Rthe terminal resistance of the motor coil ;

    the rotational speed of the body linked to the output

    shaft of the gearbox ;

    the efficiency of the gearbox ;

    KTthe motor torque constant ;

    T the torque applied on the body linked to the output

    shaft of the gearbox.One can see that the motor model is deeply related to the

    multibody simulation since the back electromotive force

    contributionKSn is computed using the motion state of

    the related body.

    The parameters of this model have been extracted from the

    datasheet of a specific motor whose selection was based

    on the module technical specifications available on the

    M-Tran website [2]. Moreover, the motor limitations are

    taken into account : the input voltage is saturated accord-

    ing to the driver supply and we monitor the current to re-

    spect the absolute electrical ratings. Those two constrainstherefore act as speed and torque limitations for the consid-

    ered motor so that the actual performances of the module

    are used during simulation.

    B.4 Position Control Loop

    To achieve locomotion, we want the joints to execute

    specific motions. More specifically, the high-level loco-

    motion algorithm gives the time history of position (i.e.

    angular value) for each controlled degree of freedom of

    1Apart from the reference module of the whole robot that features six

    extras degrees of freedom to represent its position and orientation in the

    simulation environment.2Lets note that we neglect the inductance effect Ldi/dt since the

    inductance valueL of the motor coil is very small.

    the robot. We therefore need to determine the voltage to

    be applied on the motors so that the outputs (i.e. the block

    rotations) follow the algorithm order. This is managed by a

    PID filter (one for each motor) that takes the desired posi-

    tion as input and send out the voltage to the motor accord-

    ing to the current position of the geared motor shaft. To

    fit the numerical environment, the custom PID controller

    is described by the following discrete equations (the ex-

    ponent k refers to the current sampling period, typically

    15ms):

    Pk = Kpk (3)

    Ik = Ik1 + Kitk1 (4)

    Dk = KdD

    k1 + KdN(k k1)

    (Kd +Nt) (5)

    u

    k

    = P

    k

    +I

    k

    +D

    k

    (6)with :

    Pthe proportional contribution ;

    Dthe derivative contribution ;

    Ithe integral contribution ;

    uis the output of the controller ;

    the position error ;

    Kp is the proportional gain ;

    Kdis the derivative gain ;

    Kiis the integral gain ;

    Nis a constant used to filter the high frequency noise of

    the derivative term.

    C. Pattern Generation

    Considering the global control scheme illustrated in fig-

    ure 2, the algorithm part that provides the angular setpoint

    for each joint is managed at a higher level that depends on

    the subject of the considered simulation.

    The presented simulation framework comes within the

    scope of a study of CPG-based locomotion control algo-

    rithms. Without going into details, a CPG is a bio-inspired

    network of coupled non-linear oscillators. It generates

    periodic signals that can be used as locomotion pattern

    with the ability to fit distributed architectures. The mod-

    ule model is therefore completed by adding the consid-

    ered CPG equations whose output feeds the position con-

    trol loop. As an example, for a simple phase oscillator (a

    CPG model), the output value i related to joint i is de-

    scribed by the following equations :

    i = +j

    i j (7)

    ri = r(Ri ri) (8)

    xi = x(Xi xi) (9)i = xi + ri sin(i) (10)

    with:

    3

  • 8/10/2019 3_Chariot

    4/8

  • 8/10/2019 3_Chariot

    5/8

    9th National Congress on Theoretical and Applied Mechanics, Brussels, 9-10-11 May 2012

    a fixed body to interact with the robot as the ground.

    Lets note that the built model still features open param-

    eters for the pattern generation that are loaded from an ex-

    ternal file at the beginning of the simulation. We therefore

    dont need to rebuild a new model for each iteration when

    doing a parametric study or in the scope of optimizations.

    C. Contact Forces

    As far as the contact forces are concerned, the robot

    builder takes several arguments, including an option to

    generate the code related to specific contact forces for the

    foot bodies. The latter are identified in the building tree as

    parts that belong to the last module of every branch, that is

    to say, on modules that have no child connection.

    We therefore dont generate fully generic code because

    we would have to manage contacts between all the bod-

    ies in the environment. This would considerably slow

    down the simulations at runtime which is something we

    try to avoid. Indeed, as previously brought up, the model

    is likely to be run many times (typically several hundred

    runs) with various parameters, for the sake of parametric

    studies or to tune a gait by means of optimization algo-

    rithm.

    However, The normal and tangential contact forces FnandFtare then evaluated according to the contact between

    specific points of the considered module and the ground

    using the following model :

    Fn = Knpk +Cdamp.

    pdd

    dt (12)

    Ft=

    f Fnvgvlimg

    (if||vg||

  • 8/10/2019 3_Chariot

    6/8

    9th National Congress on Theoretical and Applied Mechanics, Brussels, 9-10-11 May 2012

    where the coupling weight wi j is defined by :

    wi j =

    1 if j = i 10 if j= i 1

    (16)

    and with a unique phase shift parameter :

    i j = 1.2 i,j (17)

    As this specific coupling law is only valid for two sub-

    sequent modules, the limit cycle (i.e. after the transient

    phase) for joints 0 andi takes the following form :

    0(t) = 0.6sin(/2t+ cst) (18)

    i(t) = 0.6sin(i1 + 1.2) (19)

    The oscillator output valueirelated to joint i is the desired

    angular value as shown in figure 6.

    Fig. 6. Physical interpretation of the oscillator output iapplied to the caterpillar structure.

    A.2 Contact Forces

    In the scope of a caterpillar gait, every module is likely

    to have contact with the ground. We therefore added spe-

    cific contact forces for each block by using two different

    contact models : point-plane and sphere-plane contacts.

    Indeed, on the contact point of view, the shape of each

    block is defined by four points located on the vertices that

    define the straight edges of the square area and two spheres

    centered to fit the round edges of the block (see figure 7).

    Fig. 7. Representation of the contact force elements for

    the caterpillar simulation : four point-plane relations

    and two sphere-plane (the plane being the ground) re-

    lations for both blocks of the module.

    A.3 Results

    The resulting gait is represented in figure 8 in which one

    can observe the behaviour of the transport wave.

    Fig. 8. Transport wave gait of the caterpillar configura-

    tion. Top picture represents the state of the caterpillar

    at time t so that the system has already reached the

    limit cycle. The next pictures are the states, respec-

    tively, one, two, three and four seconds later. The black

    arrow points out the joint 7 detailed in figure 9

    Typical information extracted from simulation is the

    torques required to achieve the considered gait. For ex-ample, figure 9 shows the time evolution of the torque re-

    lated to joint 7 so that the angular position respects the sine

    pattern generated by the phase oscillator.

    -0.6

    -0.4

    -0.2

    0

    0.2

    0.4

    0.6

    6 8 10 12 14-2-1.5-1-0.500.511.52

    jointangula

    rvalue[rad]

    jointtorque[Nm]

    time [s]

    Time history of the position and torque values

    Fig. 9. Time history of torque and angular position values

    for joint 7. The solid line (left scale) shows the joint

    position whereas the dashed line (right scale) repre-

    sents the related torque. One can see that the joint an-

    gular value follows a 0.6 magnitude sine trajectory asdescribed by the oscillator limit cycle (equation (18)).

    6

  • 8/10/2019 3_Chariot

    7/8

    9th National Congress on Theoretical and Applied Mechanics, Brussels, 9-10-11 May 2012

    B. 6-legged configuration

    For the second example, we consider a simple 6-legged

    structure based on eleven modules whose configuration is

    presented in figure 10. The corresponding build file is :

    11modules-6legged.dat

    1 1 4 0 1

    1 2 4 1 3

    1 3 4 2 1

    1 4 4 3 3

    0 5 3 0 3

    2 6 5 0 1

    0 7 3 2 3

    2 8 5 2 1

    0 9 3 4 3

    2 10 5 4 1

    This configuration features a total of 28 degrees of free-

    dom and requires 33 differential equations to compute the

    equations of motion.

    Fig. 10. Example of a 6-legged configuration generated

    with the framework : five modules are used to form

    the spine and six modules are added to model the

    limbs.

    B.1 Gait Definition

    For this example, we only used the framework to gener-

    ate the physical model (kinematics, inertia, actuators and

    the position controllers) and generated the gait algorithm

    manually. The latter is based on an alternate tripod gait as

    described in figure 11.

    B.2 Contact Forces

    The considered gait only requires a few contacts that

    always involves the same parts of the robot. Indeed, the

    Fig. 11. Alternative tripod gait applied to a 11 modules

    configuration. The red areas indicate the limbs thathave contact with the ground while the dashed arrows

    show the direction of motion. From top left to bot-

    tom right : 1) the robot stands in low position on the

    front right (FR), the rear right (RR) and the middle

    left (ML) limbs with the 3 other limbs in back-side

    position ; 2) the robot is still standing on FR, RR and

    ML and goes up while bringing the other tripod to the

    front - the latter does not touch the ground thanks to

    an additional ankle movement ; 3) the robot reaches

    the low position again, still standing on FR, RR and

    ML with the front left (FL), the rear left (RL) and themiddle right (MR) limbs in front-side position ; 4) the

    robot now stands on the FL-RL-MR tripod and goes

    up again while bringing the FR-RR-ML tripod to the

    front to repeat the pattern.

    interaction between the robot and the ground is always lo-

    cated at the lower plane area of the feet (on the bottom of

    every lower green blocks of the limb modules). This con-

    tact is fully defined by four points located at the vertices ofthe square area (see figure 12) and for which the model of

    contact between a point and a plane is applied.

    B.3 Results

    For this gait, it appears that the highest torque required

    is reached in the spine joint related to the block to which

    the central limbs modules are connected (see figure 13).

    For this joint, the gait algorithm wants the position con-trol loop to hold a constant value during the hole cycle so

    that the spine remains straight. The resulting torque and

    angular position are shown in figure 14.

    7

  • 8/10/2019 3_Chariot

    8/8

    9th National Congress on Theoretical and Applied Mechanics, Brussels, 9-10-11 May 2012

    Fig. 12. Contact definition of the foot area : four con-

    tact points delimit the square surface of each limb that

    is used for ground interaction for the alternate tripod

    gait.

    Fig. 13. The red arrow points to the central joint of the

    spine that corresponds to the most stressed actuator.

    V. CONCLUSION & OUTLOOK

    Our simulation framework provides an extended multi-body model to study the locomotion of modular robots.

    It takes the kinematics and inertia properties into account

    but also features the electro-mechanical model of the actu-

    ators and the corresponding position control loops so that

    the resulting simulation features many aspects of an actual

    experiment. A specific CPG module is also included so we

    can deal with the particularities of modular robot locomo-

    tion.

    Even if the framework can directly manage some con-

    tact force cases, it generally needs the user to implementit manually. A more general approach is therefore desir-

    able but it also requires a higher computational cost at

    runtime. Besides, it is generally difficult to fit a contact

    -0.1

    -0.05

    0

    0.05

    0.1

    4 4.5 5 5.5 6 6.5 7 7.5 80

    0.2

    0.4

    0.60.8

    1

    1.2

    jointangularva

    lue[rad]

    jointtorque

    [Nm]

    time [s]

    Time history of the position and torque values

    Fig. 14. Time history of torque and angular position val-

    ues for the central spine joint. The solid line (left

    scale) shows the joint position whereas the dashed line

    (right scale) represents the related torque. The joint isdesired to hold a position of zero during the hole cy-

    cle and one can see the effect of the position control

    loop : the generated torque compensates for the ef-

    forts applied on the joint during the gait.

    model to experimental data but in our case we dont focus

    on quantitative results about contacts. Our contact model

    remains simplistic, but it is sufficient to evaluate the effect

    of a given kinematics pattern to provide a stable gait.

    Moreover, the CPG module is limited to predefinedCPG models hard-coded in the robot builder, the user

    therefore needs to update the module manually so that it

    suits to its own model. We plan to generalize the CPG

    module so that the user could automatically incorporate a

    specific CPG just by providing its equations in a configu-

    ration file.

    REFERENCES

    [1] Satoshi Murata and Haruhisa Kurokawa, Self-reconfigurable

    robots, IEEE Robotics & Automation Magazine, pp. 7178,

    March 2007.

    [2] http://unit.aist.go.jp/is/frrg/dsysd/mtran3/, .

    [3] C. Chariot, E Filippi, and O. Verlinden, Multibody simulation

    of modular robots : performances and feasibility of simplified 6-

    legged and caterpillar gait, inProceedings of the Multibody Dy-

    namics 2011. ECCOMAS Thematic Conference, June 2011.

    [4] O. Verlinden, G. Kouroussis, and C. Conti, Easydyn: A frame-

    work based on free symbolic and numerical tools for teaching

    multibody systems, in Proceedings of the Multibody Dynamics

    2005. ECCOMAS Thematic Conference, June 2005.

    8