17
PLEASE SCROLL DOWN FOR ARTICLE This article was downloaded by: [The University of Manchester] On: 20 August 2010 Access details: Access Details: [subscription number 915545541] Publisher Taylor & Francis Informa Ltd Registered in England and Wales Registered Number: 1072954 Registered office: Mortimer House, 37- 41 Mortimer Street, London W1T 3JH, UK International Journal of Systems Science Publication details, including instructions for authors and subscription information: http://www.informaworld.com/smpp/title~content=t713697751 Hybrid automata: an insight into the discrete abstraction of discontinuous systems Eva M. Navarro-López a ; Rebekah Carter a a School of Computer Science, The University of Manchester, Manchester, M13 9PL, UK First published on: 19 August 2010 To cite this Article Navarro-López, Eva M. and Carter, Rebekah(2010) 'Hybrid automata: an insight into the discrete abstraction of discontinuous systems', International Journal of Systems Science,, First published on: 19 August 2010 (iFirst) To link to this Article: DOI: 10.1080/00207721.2010.495189 URL: http://dx.doi.org/10.1080/00207721.2010.495189 Full terms and conditions of use: http://www.informaworld.com/terms-and-conditions-of-access.pdf This article may be used for research, teaching and private study purposes. Any substantial or systematic reproduction, re-distribution, re-selling, loan or sub-licensing, systematic supply or distribution in any form to anyone is expressly forbidden. The publisher does not give any warranty express or implied or make any representation that the contents will be complete or accurate or up to date. The accuracy of any instructions, formulae and drug doses should be independently verified with primary sources. The publisher shall not be liable for any loss, actions, claims, proceedings, demand or costs or damages whatsoever or howsoever caused arising directly or indirectly in connection with or arising out of the use of this material.

International Journal of Systems Science Hybrid automata ...staff.cs.manchester.ac.uk/~navarroe/papers/enavarro_ijss10.pdf · Hybrid automata: an insight into the discrete abstraction

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

Page 1: International Journal of Systems Science Hybrid automata ...staff.cs.manchester.ac.uk/~navarroe/papers/enavarro_ijss10.pdf · Hybrid automata: an insight into the discrete abstraction

PLEASE SCROLL DOWN FOR ARTICLE

This article was downloaded by: [The University of Manchester]On: 20 August 2010Access details: Access Details: [subscription number 915545541]Publisher Taylor & FrancisInforma Ltd Registered in England and Wales Registered Number: 1072954 Registered office: Mortimer House, 37-41 Mortimer Street, London W1T 3JH, UK

International Journal of Systems SciencePublication details, including instructions for authors and subscription information:http://www.informaworld.com/smpp/title~content=t713697751

Hybrid automata: an insight into the discrete abstraction of discontinuoussystemsEva M. Navarro-Lópeza; Rebekah Cartera

a School of Computer Science, The University of Manchester, Manchester, M13 9PL, UK

First published on: 19 August 2010

To cite this Article Navarro-López, Eva M. and Carter, Rebekah(2010) 'Hybrid automata: an insight into the discreteabstraction of discontinuous systems', International Journal of Systems Science,, First published on: 19 August 2010(iFirst)To link to this Article: DOI: 10.1080/00207721.2010.495189URL: http://dx.doi.org/10.1080/00207721.2010.495189

Full terms and conditions of use: http://www.informaworld.com/terms-and-conditions-of-access.pdf

This article may be used for research, teaching and private study purposes. Any substantial orsystematic reproduction, re-distribution, re-selling, loan or sub-licensing, systematic supply ordistribution in any form to anyone is expressly forbidden.

The publisher does not give any warranty express or implied or make any representation that the contentswill be complete or accurate or up to date. The accuracy of any instructions, formulae and drug dosesshould be independently verified with primary sources. The publisher shall not be liable for any loss,actions, claims, proceedings, demand or costs or damages whatsoever or howsoever caused arising directlyor indirectly in connection with or arising out of the use of this material.

Page 2: International Journal of Systems Science Hybrid automata ...staff.cs.manchester.ac.uk/~navarroe/papers/enavarro_ijss10.pdf · Hybrid automata: an insight into the discrete abstraction

International Journal of Systems Science2010, 1–16, iFirst

Hybrid automata: an insight into the discrete abstraction of discontinuous systems

Eva M. Navarro-Lopez* and Rebekah Carter

School of Computer Science, The University of Manchester, Oxford Road,Kilburn Building, Manchester, M13 9PL, UK

(Received 18 December 2009; final version received 27 April 2010)

We develop a novel computational–dynamical framework for the modelling of a class of discontinuousdynamical systems (DDSs). In particular, what is referred to as the DDS hybrid automaton with inputs andoutputs is proposed. This is a general hybrid automaton that provides a suitable mathematical model for DDSswith discontinuous state derivatives and sliding motions. The chief characteristic of this model is that, followingthe computational divide-and-conquer principle, a system with multiple discontinuous elements can be representedby the composition of several DDS hybrid automata. Although discontinuous, non-smooth or switcheddynamical systems have been well-investigated within different frameworks, it is still a challenge to givesatisfactory solutions for specifying the transitions between the different modes of operation of these systems.We propose a new way of solving this problem, which is especially effective for systems with multiple switchingelements. An example is used to illustrate these ideas. Several simulations are presented. The simulations resultsare obtained with Stateflow� and Modelica�.

Keywords: hybrid systems; symbolic dynamics; discontinuous systems; hybrid automata; sliding motions;Stateflow�; Modelica�

1. Motivation

It might be as simple as jumping on a trampoline, or assophisticated as the docking of vehicles in outer space;as trivial as playing billiards, or as crucial as main-taining the stability of an airplane during landing; asrandom as the flow of information in a communicationnetwork or as synchronised as a school of fishswimming in the sea. These are examples of systemsthat combine continuous and discrete, smooth andabrupt dynamics. In dynamical systems theory, this iscalled discontinuity or switching behaviour. The sys-tems exhibiting it are called discontinuous, switched,non-smooth or piecewise-smooth systems. Their com-bined dynamics can be seen as a hybrid dynamicalsystem.

The term ‘hybrid system’ has been used to labela wide variety of engineering problems, such asheterogeneous systems, multi-modal systems, multi-controller systems, logic-based switching control sys-tems, discrete-event systems or variable structuresystems, among others. In general, hybrid systems aredynamical systems consisting of continuous-type anddiscrete-event dynamics. They merge formal computa-tional tools, dynamical systems theory and controlengineering methodologies.

There are several modelling frameworks for hybriddynamical systems. Each framework is oriented to

specific types of problems and, indeed, reflects the

background of the researchers behind it, whether their

specialisation is computer science, control engineering

or applied mathematics (Witsenhausen 1966; Tavernini

1987; Alur, Courcoubetis, Henzinger, and Ho 1993;

Antsaklis, Stiver, and Lemmon 1993; Henzinger 1996;

Branicky, Borkar, and Mitter 1998; Ye, Michel, and

Hou 1998; van der Schaft and Schumacher 2000; Buss,

Glocker, Hardt, von Stryk, and Schmidt 2002). In this

article, the hybrid automaton-based framework is used

(Alur et al. 1993; Henzinger 1996), which merges

continuous dynamics and finite automaton theories. It

is a graph-related representation which is closely

connected to computer science discrete representations,

and also to symbolic dynamics.The contribution of this article is to reinterpret

discontinuous dynamical systems (DDSs) with sliding-

type behaviour as hybrid automata with inputs and

outputs. The use of a computational model, such as a

hybrid automaton, is an elegant way to specify the

multiple transitions between the different modes of

operation of a discontinuous system.Three key analysis aspects make the modelling and

simulation of DDSs more challenging. Firstly, DDSs

entail a wide variety of complex behaviours which

usually lead to faults or dynamics degrading perfor-

mance. These complex behaviours usually have their

*Corresponding author. Email: [email protected]

ISSN 0020–7721 print/ISSN 1464–5319 online

� 2010 Taylor & Francis

DOI: 10.1080/00207721.2010.495189

http://www.informaworld.com

Downloaded By: [The University of Manchester] At: 09:25 20 August 2010

Page 3: International Journal of Systems Science Hybrid automata ...staff.cs.manchester.ac.uk/~navarroe/papers/enavarro_ijss10.pdf · Hybrid automata: an insight into the discrete abstraction

origin in what is known as a discontinuity-inducedbifurcation (DIB; Awrejcewicz and Lamarque 2003;Kunze 2004; di Bernardo, Budd, Champneys, andKowalczyk 2008). Secondly, the non-uniqueness oreven non-existence of solutions when the trajectoriesof the DDS either cross or slide on a discontinuitysurface. Finally, the simulation and numerical integra-tion problems (mainly, the zero-crossing location anddetection).

It is well-known that non-uniqueness or even non-existence of solutions may arise in discontinuoussystems when the trajectories either cross or slide ona discontinuity surface. This has been extensivelystudied in systems with Coulomb friction. Even forsimple systems, the non-uniqueness of solutions canappear if the system dynamics and all the transitionsbetween the different modes of operation of the systemare not appropriately specified (Lotstedt 1991). Acomplete overview of the problem can be found inBrogliato (1999).

The problem of uniquely defining the solution in adiscontinuous system has been solved by means ofdifferent methods (Filippov 1988; Utkin 1992).However, there are still different challenges concerningthe simulation and the numerical integration of thesesystems (Acary and Brogliato 2008). There are twomain issues, the first of which is the problem ofmaintaining the trajectory on the discontinuity surfaceonce it has entered the surface; this is called thetracking error. Several numerical solutions have solvedthis problem and are closely related to avoiding thechattering phenomenon (Zhao and Utkin 1996;Mosterman, Zhao, and Biswas 1999). The secondmajor issue is the detection and location of pointswhere the trajectory crosses the discontinuity surface;this is known as zero-crossing detection (Parkand Barton 1996; Zhang, Yeddanapudi, andMosterman 2008).

In the past decade, there has been an effort inproposing different semantics and computational-oriented frameworks for modelling systems exhibitingsliding-type behaviour. For example, object-orientedmodels (Elmqvist, Cellier, and Otter 1993; Mattsson1996) or hybrid dynamic models (Mosterman andBiswas 2000) are used for different applications. Inthis article, two hybrid automaton models are pro-posed for this same purpose. Our approach differsfrom these computational models for DDSs. Wepropose a general framework for a class of discontin-uous systems, while these works are focused onparticular examples.

The two hybrid automata proposed model generalDDSs with sliding-type behaviour and one disconti-nuity surface. The first hybrid model, called the DDShybrid automaton, has three discrete locations.

This model overcomes some problems encountered inthe 3-discrete-state object-oriented model given inMattsson (1996). The second hybrid model is theextended DDS hybrid automaton with five discretelocations. It is inspired by simulation-oriented modelsof discontinuous friction (Karnopp 1985; Leine,van Campen, de Kraker, and van den Steen 1998),and by the state-transition diagram of a friction modelpresented in Elmqvist et al. (1993). An importantcharacteristic of the models proposed is that systemswith multiple discontinuity surfaces can be obtainedby the composition of several DDS hybrid automata(Navarro-Lopez 2009c).

This article is inspired by the results of Navarro-Lopez (2009c,d) where the DDS hybrid automata wereoriginally presented. The basis of these hybrid autom-aton models is the hybrid model extracted fromJohansson, Egerstedt, Lygeros, and Sastry (1999),Lygeros, Tomlin, and Sastry (1999) and Lygeros,Johansson, Simic, Zhang, and Sastry (2003). It isvery similar to the Hybrid State Model (HSM)proposed in Buss et al. (2002). The main differencebetween the HSM and the hybrid model used here isthat the HSM uses an equation-based representation,and the discontinuity surfaces are defined by means ofswitching functions instead of guard sets.

The specification of discontinuous systems given inthis article leads to a simulation algorithm. The eventsor discrete transitions between the different modes ofoperation of the system are defined in order to clearlyspecify all the possible changes in the dynamics. As aconsequence, the hybrid automata proposed can betranslated to a program or to any other descriptionlanguage (e.g. Forbus 1984; Kuipers 1986; Brockett1988; Woods 1991; Egerstedt and Brockett 2003).

In order to validate the models, a system withdiscontinuous friction and different sliding-mode-related dynamics is considered. It is the torsionalmodel of a conventional vertical oilwell drillstring of2 degrees of freedom (DOF), which has been widelystudied, for instance, in Navarro-Lopez and Cortes(2007), Navarro-Lopez and Liceaga-Castro (2009) andNavarro-Lopez (2009a,b) and references therein. Inorder to illustrate the use of the basic DDS hybridautomata for modelling DDSs with multiple disconti-nuity surfaces, a sliding-mode-based control is intro-duced in the example.

The simulation of the hybrid automata is carriedout by means of the Simulink/Stateflow� toolbox ofMATLAB� (The MathWorks 2008) and Modelica�

(Modelica 2009). The translation between theSimulink/Stateflow or Modelica models and thehybrid automata is far from being trivial (Agrawal,Simon, and Karsai 2004; Alur, Kanade, Ramesh, andShashidhar 2008); however, we do not have major

2 E.M. Navarro-Lopez and R. Carter

Downloaded By: [The University of Manchester] At: 09:25 20 August 2010

Page 4: International Journal of Systems Science Hybrid automata ...staff.cs.manchester.ac.uk/~navarroe/papers/enavarro_ijss10.pdf · Hybrid automata: an insight into the discrete abstraction

problems in our example. The simulation results givenby the two packages are compared and Modelica� isconcluded to be more appropriate in the numericalintegration, especially when the number of discretelocations and transitions increase. The simulation ofthe hybrid automata presented here was extensivelystudied in Carter (2009).

Whilst a particular validation example is used, theproposed framework is general and applicable to abroader class of physical and engineering systemssubject to different types of discontinuous interactionswith their environment. The computational frameworkpresented gives a fresh perspective for the dynamicalanalysis and control design of systems withdiscontinuities.

2. The DDS hybrid automaton

2.1. The general hybrid automaton model

The following general hybrid automaton is used. It isbased on the hybrid model given in Johansson et al.(1999) and Lygeros et al. (1999, 2003).

Definition 2.1: A hybrid automaton with inputs andoutputs is a collection

H ¼ ðQ,E,X ,�,U,O,Y,Dom,F , Init,G,R, h, rÞ,

where:

. Q¼ {q1, q2, . . . , qN} is a finite set of discretestates or locations.

. E�Q�Q is a finite set of edges calledtransitions or events.

. X �Rn is the continuous state space.

. U �Rm and Y �Rm are the continuous inputand output spaces, respectively.

. �¼ {�1, �2, . . . , �M} is a finite set of symbolslabelling the edges and representing the dis-crete input events.

. O¼ {o1, o2, . . . , oK} is a finite set of symbolsrepresenting the discrete output events.

. Dom :Q! 2X�U is the location domain. It is amapping from the locations Q to the set of allsubsets of X �U, that is, Dom assigns a set ofcontinuous states and inputs to each discretestate qi2Q, thus, Dom(qi)�X �U.

. F ¼ {fqi(x, u) : qi2Q} is the collection of vector

fields describing the continuous dynamics suchthat fqi

:X �U!X . Each fqi(x, �) is assumed

to be Lipschitz continuous on the locationdomain for qi in order to ensure that thesolution within Dom(qi) exists and is unique.

. Init�Q�X is a set of initial states.

. G :E! 2X is a mapping that defines a guardset. G assigns to each edge e¼ (qi, qj)2E a set

of continuous states (G(e)�X ). Each guardset plays the role of an enabling condition inorder to change the location.

. R :E�X �U! 2X is a reset map for thecontinuous states for each edge. It isassumed that 8e2E, G(e) 6¼ ; and 8x2G(e),R(e, x, u) 6¼ ;. This is assumed so that thecontinuous dynamics cannot be destroyed,only changed.

. h :Q�X �U!Y is the continuous outputmapping, there is one for each location.

. r :Q�X ���U!O is the discrete outputmap, there is one for each location.

As long as the system is within location qi, thecontinuous state x must satisfy x2Dom(qi). Thetransition from a discrete state qi to another qj isenabled when the continuous state x reaches the guardG(qi, qj)�X of some edge (qi, qj)2E. Then, the discretestate changes to qj and at the same time, x is reset tothe value specified by R(qi, qj, x, u)�X . H will berepresented as a directed graph (Q,E ) with vertices Qand edges E. For each vertex qi2Q, a set of initialconditions, a vector field and a domain are given. Inaddition, a guard, a label and a reset function areassociated with each edge, e2E. These semantics of Hare defined below.

The state ofH is z¼ (q, x)2Q�X . Consider a timedomain �¼Rþ and T¼ {t0, t1, . . . , tf}, with tk2� forevery k2N, an ordered set of event time points. Tcontains the initial time t0 and all times at which atransition from one discrete location to another occurs.tf can be infinite. For all tk2T, the continuous statesare written as xk :¼x(tk), the locations as qk :¼ q(tk),the continuous inputs and outputs as uk :¼ u(tk) andyk :¼ y(tk), respectively. We define a continuous inputand a continuous output sequence as �u :¼(u0, u1, . . . , uf) and �y :¼ ( y0, y1, . . . , yf), respectively.Moreover, a discrete input and a discrete outputsequence is defined by �� :¼ (�0, �1, . . . , �f) and�o :¼ (o0, o1, . . . , of), respectively, with �k2�, andok2O 8k.

Definition 2.2 (Stursberg 2006): For an inputsequence �u, a feasible execution (or run) of H is asequence of hybrid states �z¼ (z(t0), z(t1), . . . , z(tf)),with zk :¼ z(tk)¼ (qk, xk) such that:

. Initial condition: z0¼ (q0,x0) with q0¼q(t0)2Q and x02Dom(q0), x0 =2G((q0, �)) forany (q0, �)2E.

. State evolution: z(tkþ1), with tkþ1 :¼ tkþ �,� 2�, is obtained from z(tk) according to:

. The continuous evolution: � : [0, �]!X ,�(0)¼x

k, _�ðtÞ ¼ fqkð�ðtÞ, ukÞ with

unique solution for t2 [0, �], and

International Journal of Systems Science 3

Downloaded By: [The University of Manchester] At: 09:25 20 August 2010

Page 5: International Journal of Systems Science Hybrid automata ...staff.cs.manchester.ac.uk/~navarroe/papers/enavarro_ijss10.pdf · Hybrid automata: an insight into the discrete abstraction

�(t)2Dom(qk). Moreover, h :Q�X �

U!Y, y¼ h(qk, �(t), uk).. Discrete transition: (qk, qkþ1)2E,

�(�)2G((qk, qkþ1)), and xkþ1¼

R((qk, qkþ1), �(�), uk)2Dom(qkþ1).. Input and output selection: ukþ12U,

ykþ12Y, a discrete input �kþ12� and

a discrete output okþ12O are associ-

ated with each (qk, qkþ1)2E.

2.2. DSSs as DDS hybrid automata

DDSs with discontinuous state derivatives and with

one discontinuity (or switching) surface can be

modelled as a hybrid automaton H. These systems

may exhibit sliding-type behaviour on the discontinuity

surface.A state-dependent input control u(x) is used,

consequently the vector fields can be written as fqi(x),

and,

_x ¼fþðxÞ if x 2 Sþ,

f�ðxÞ if x 2 S�,

�ð1Þ

where x2X �Rn is the state vector, fþ and f� are

continuous and smooth, and Sþ¼ {x2X : s(x)4 0},

S�¼ {x2X : s(x)5 0}, with s a smooth scalar function

with non-vanishing gradient. The discontinuity surface

is S0¼ {x2X : s(x)¼ 0}, and X ¼Sþ[S�[S0. On S0,

fþ(x) and f�(x) do not agree.The discontinuity surface is divided into two

regions, the sliding set S 0s , which is closed, and the

crossing set S 0c , which is open. Then S0 ¼ S 0

s [ S0c . S

0s

is the set where a sliding motion can take place, and S 0c

is the set of S0 within which the trajectory crosses S0

without sliding. The system dynamics on S0 are_x ¼ fsðxÞ, where fs is the equivalent dynamics

(Filippov 1988; Utkin 1992).In this article, Utkin’s equivalent control method is

used (Utkin 1992), which, as it is established in Zhao

and Utkin (1996) and Mosterman et al. (1999), gives

better chatter-free simulation results for some cases.

Then,

fsðxÞ ¼fþðxÞ þ f�ðxÞ

2þ ueqðxÞ

f�ðxÞ � fþðxÞ

2, ð2Þ

with ueq(x)2 [�1, 1] a scalar function playing the role

of the equivalent control. From (2), and taking

into account that fs must be tangential to S0, one

yields to,

ueqðxÞ ¼ �rsðxÞ, fþðxÞ� �

þ rsðxÞ, f�ðxÞ� �

rsðxÞ, f�ðxÞ� �

� rsðxÞ, fþðxÞ� � , ð3Þ

where rs is the gradient of s and h�, �i denotes the scalarproduct of vectors. The sliding set has the followingform,

S 0s :¼ fx 2 S0 : �1 � ueqðxÞ � 1g: ð4Þ

S 0c is the complement set of S 0

s in S0. It is assumed thatthere are no points on S 0

s at which both fþ and f� aretangent to S0. Furthermore, the sliding set is attractivefor x such that hrs(x), f�(x)i� hrs(x), fþ(x)i4 0 andrepulsive for x such that hrs(x), f�(x)i� hrs(x),fþ(x)i5 0 (Kuznetsov, Rinaldi, and Gragnani 2003).

Definition 2.3: A DDS hybrid automaton with threediscrete states (HDDS1

) describing the dynamics ofsystem (1) is a particular case of H with,

. Q¼ {q1, q2, q3}¼ {slipþ, slip�, stick}, X �Rn.

. E¼ {(q1, q2), (q1, q3), (q2, q1), (q2, q3), (q3, q1),(q3, q2)}.

. �¼ {a, b, c}. One edge label is assigned to eachguard set.

. �¼O. The discrete output events coincidewith the discrete input events.

. Dom(q1)¼Sþ[ {x2S0 :ueq(x)4 1},Dom(q2)¼S�[ {x2S0 :ueq(x)5�1},Domðq3Þ ¼ S 0

s .. fq1

(x)¼ fþ(x), fq2(x)¼ f�(x), fq3

(x)¼ fs(x).. Init¼Q�XnUs, with Us :¼ fx 2 S 0

s : rsðxÞ,�

f�ðxÞi � rsðxÞ, fþðxÞ� �

5 0g. Then, the prob-lem of non-uniqueness of solutions startingat unstable sliding sets is avoided. Indeed, inmost cases, solutions starting away fromunstable sliding surfaces do not usually reachthem.

. Gðq1, q3Þ ¼ Gðq2, q3Þ ¼ S 0s , G(q1, q2)¼G(q3,

q2)¼ {x2S0 : ueq(x)5�1}, G(q2, q1)¼G(q3,q1)¼ {x2S0 : ueq(x)4 1}.

. R(qi, qj, x)¼ {x} 8i, j with j 6¼ 3, R(q1, q3, x)¼R(q2, q3, x)¼ {x : s(x)¼ 0}.

. y¼ h(q1, x)¼ h(q2, x)¼ h(q3, x) is the continu-ous output, which is the same for all thelocations.

We point out that, in the domains Dom(q1) andDom(q2), the following guard sets are included:{x2S0 : ueq(x)4 1}, for Dom(q1), and {x2S0 :ueq(x)5�1}, for Dom(q2). This has been done toensure that, as soon as we enter the location, we are notgoing to go out of it. Under this consideration, thevector fields considered, fþ or f�, are still valid,because the guard set added to each domain is onlyvalid at the instant we enter the location, beingconsidered as a transition time. This is overcome inthe hybrid model of five locations presented in the nextsection, because two transitions states from stick tomotion are included.

4 E.M. Navarro-Lopez and R. Carter

Downloaded By: [The University of Manchester] At: 09:25 20 August 2010

Page 6: International Journal of Systems Science Hybrid automata ...staff.cs.manchester.ac.uk/~navarroe/papers/enavarro_ijss10.pdf · Hybrid automata: an insight into the discrete abstraction

A similar hybrid model to HDDS1was obtained in

Sedghi, Srinivasan, and Longchamp (2002) and Sedghi

(2003). The difference with HDDS1is that the hybrid

framework used in Sedghi et al. (2002) and Sedghi

(2003) is an equation-based representation.

3. Modifying the DDS hybrid automaton

A new hybrid automaton with five discrete loca-

tions is proposed in order to overcome some specifica-

tion and numerical problems encountered in HDDS1.

It will be called the extended DDS hybrid automaton,

HDDS2.

This hybrid automaton considers intermediate

transitions when leaving the discontinuity surface

(stick-to-slip transition). HDDS2includes two interme-

diate states before motion (one for positive velocities,

another for negative velocities), such as: q5¼ {transþ}

and q4¼ {trans�}. Indeed, what we are doing is

splitting the stick state into three parts: first when the

trajectories are within the sliding set (q3), second and

third when the trajectories are within the crossing set

on the discontinuity surface (q4 or q5).The necessity of these states for simulation pur-

poses is well-known, see, e.g. Elmqvist et al. (1993) and

Mattsson (1996). The extended DDS hybrid automaton

HDDS2is also inspired in the state-transition diagram of

a friction model presented in Elmqvist et al. (1993).

The vector fields associated with q4 ( f�s ðxÞ) and q5( fþs ðxÞ) have to be different from the vector field within

q3, and they will vary depending on the application (see

Section 4 for more details). In addition, for avoiding

numerical problems with zero-crossing detection, a

zero velocity band is used.Furthermore, there is no direct switching between

slipþ and slip� or vice-versa. For example, if a

transition slipþ! slip� should be carried out, if the

system is in state slipþ and s becomes zero, the system

switches to stick before checking the conditions for

switching to slip�. Moreover, if the system is in

location transþ and the velocity is reversed before

starting to move, the system switches to state stick

before going to slip�. This is a way to avoid the non-

determinism discussed in Mattsson (1996).

Definition 3.1: The extended DDS hybrid automaton

with five discrete states (HDDS2) describing the dynam-

ics of system (1) is a particular case of H with,

. Q¼ {q1, q2, q3, q4, q5}¼ {slipþ, slip�, stick,

trans�, transþ}, X �Rn.. E¼ {(q1, q3), (q2, q3), (q3, q5), (q3, q4), (q4, q3),

(q5, q3), (q4, q2), (q5, q1)}.. �¼O¼ {a, b, c, d}.

. Dom(q1)¼ {x2Rn : s(x)4 �}, Dom(q2)¼ {x2Rn : s(x)5��}, Domðq3Þ ¼ G�0 ¼ fx 2 <

n :

jsðxÞj � �, jueqðxÞj � 1g, Domðq4Þ ¼ G�� ¼ fx 2<n : jsðxÞj � �, ueqðxÞ5�1g, Domðq5Þ ¼G�þ ¼fx 2<n : jsðxÞj � �, ueqðxÞ41g, with 05 �5 1.

. fq1(x)¼ fþ(x), fq2

(x)¼ f�(x), fq3(x)¼ fs(x),

fq4ðxÞ ¼ f�s ðxÞ, fq5 ðxÞ ¼ fþs ðxÞ.. Init¼Q�XnUs, with Us as previously

defined.. Gðq1,q3Þ¼Gðq2,q3Þ¼Gðq5,q3Þ¼Gðq4,q3Þ¼G�0,

Gðq3,q4Þ¼G��, Gðq3,q5Þ¼G�þ, G(q5, q1)¼G(q4, q2)¼ {x2Rn : js(x)j4 �}.

. R(qi, qj, x)¼ {x} 8i, j with j 6¼ 3, R(qi, q3, x)¼{x : s(x)¼ 0} 8i2 {1, 2, 4, 5}.

. y¼ h(q1, x)¼ h(q2, x)¼ h(q3, x)¼ h(q4, x)¼h(q5, x).

It must be pointed out that, in hybrid automata(in general, in hybrid systems), in addition to ensure theexistence and uniqueness of solutions for the dynamicalsystems within each location, we need to considerproblems intrinsically associated with the hybrid natureof these systems, mainly: blocking behaviour, non-determinism in discrete transitions and Zeno-typebehaviour – that is, an infinite number of discretetransitions in a finite amount of time. A similarphenomenon to Zeno behaviour appears in discontin-uous/switched or variable structure systems (which areconsidered synonyms), and is known as chattering.Chattering can be considered as a class of Zenobehaviour and involves infinitely fast switching in thevicinity of a discontinuity surface (Zhao and Utkin1996; Mosterman et al. 1999). It is eliminated by thedefinition of the system dynamics on the discontinuitysurface – also referred to as regularisation. In ourcase, we propose the DDS hybrid automata in order tomodel DDSs with discontinuous state derivatives,and the switching is related to the discontinuity surfacesin the system and the sliding motions on them. Sincewe have uniquely defined the equivalent dynamics ofthe system on the discontinuity surfaces, we haveavoided Zeno and chattering phenomena. Other regu-larisation methods have been proposed for other typesof hybrid systems (Johansson et al. 1999).

In the next section, HDDS1and HDDS2

are used tomodel a system with discontinuous friction. In thisexample, the discontinuity in the state derivatives comesfrom a sign-type function (within the friction model). Inthis type of discontinuous systems, in order to preventthe system trajectories exhibiting the chattering phe-nomenon, the sign function is substituted by a satura-tion-type function. In our case, since we have uniquelydefined the trajectories of the system on the discontinu-ity surface, we have eliminated the problem of chatter-ing or Zeno behaviour in the class of DDSs considered.

International Journal of Systems Science 5

Downloaded By: [The University of Manchester] At: 09:25 20 August 2010

Page 7: International Journal of Systems Science Hybrid automata ...staff.cs.manchester.ac.uk/~navarroe/papers/enavarro_ijss10.pdf · Hybrid automata: an insight into the discrete abstraction

4. Example: the DDS hybrid automata for a system

with friction

The example to validate the general hybrid models is a

simplified 2-DOF-model of a vertical oilwell drillstring.

It is a particular case of the n-DOF model proposed

in Navarro-Lopez and Cortes (2007). The change in

the number of DOFs only implies the change in the

dimension of the continuous state space within each

location.The drillstring torsional behaviour is described by a

simple torsional pendulum driven by an electrical

motor, and the bit-rock contact is described by a dry

friction model. The drill pipes are represented by a

linear spring with torsional stiffness kt and a torsional

damping ct, which connect the inertias Jr and Jb.The system state vector is x ¼ ð _’r, ’r � ’b, _’bÞ

T,

with ’i, _’i (i2 {r, b}) the angular displacements and

angular velocities of the top-rotary system and the bit.

At the top-drive system, a viscous damping torque is

considered (crx1). Tm¼ u is the torque applied by a

motor at the surface and is considered as a constant

input. Tb(x3)¼ cbx3þTfb(x3) is the torque on the bit

with cbx3 approximating the influence of the mud

drilling on the bit behaviour. Tfb(x3) is the friction

modelling the bit-rock contact, and Tfb(x3)¼

fb(x3)sign(x3) with:

fbðx3Þ ¼WobRb �cb þ ð�sb � �cbÞ exp��bvfjx3j

h i, ð5Þ

with Wob4 0 the weight on the bit (considered as a

constant input), Rb4 0 the bit radius; �sb, �cb2 (0, 1)

the static and Coulomb friction coefficients associated

with Jb, 05 �b5 1 and vf4 0. In addition, the

Coulomb and static friction torque is Tcband Tsb

,

respectively, with Tcb¼WobRb�cb

, Tsb¼WobRb�sb

. The

sign function is considered as

signðx3Þ ¼ x3=jx3j if x3 6¼ 0,

signðx3Þ 2 ½�1, 1� if x3 ¼ 0:ð6Þ

The drillstring dynamics is given by

_x1 ¼1

Jr�ðct þ crÞx1 � ktx2 þ ctx3 þ u½ �,

_x2 ¼ x1 � x3,

_x3 ¼1

Jbct x1 þ kt x2 � ðct þ cbÞx3 � Tfbðx3Þ� �

,

ð7Þ

or in a compact form, _xðtÞ ¼ AxðtÞ þ BuðtÞ þ TfðxðtÞÞ,

where A, B are constant matrices and Tf represents the

torque on the bit. The inputs of the system are u and

Wob. The outputs are the angular velocities x1 and x3.For (7) with (5), s(x)¼ sb(x)¼ x3, the switching

surface is Sb0 ¼ fx 2 <

3 : x3 ¼ 0g and the sliding set

is Sbs ¼ fx 2 Sb

0 : jct x1 þ kt x2j � Tsbg. Notice that Tfb

plays the role of the equivalent control (Tfbeq), and

Tfbeq is the solution for Tfbof equation _sb ¼ 0, that

is, ueq¼Tfbeq¼ ctx1þ ktx2� (ctþ cb)x3. Moreover,

�Tsb�Tfbeq�Tsb

. For more details, the reader is

invited to read Navarro-Lopez and Cortes (2007),

Navarro-Lopez and Liceaga-Castro (2009) and

Navarro-Lopez (2009a).The DDS hybrid automaton HDDS1

associated with

system (7) and (5) has the following vector fields, guard

and domain mappings:

fq1ðx,Wob,uÞ ¼AxþBuþTfðxÞ��Tfb¼Tþ

fb

¼ fþðxÞ,

fq2ðx,Wob,uÞ ¼AxþBuþTfðxÞ��Tfb¼T�

fb

¼ f�ðxÞ,

fq3ðx,uÞ¼

1

Jr�ðctþ crÞx1�ktx2þu½ �

x1

0

0BB@

1CCA¼ fsðxÞ,

Gðq1,q3Þ¼Gðq2,q3Þ¼ fx2Sb0 : jueqðxÞj �Tsbg¼G0¼Sb

s ,

Gðq1,q2Þ¼Gðq3,q2Þ¼ fx2Sb0 : ueqðxÞ5 �Tsbg¼G�,

Gðq2,q1Þ¼Gðq3,q1Þ¼ fx2Sb0 : ueqðxÞ4Tsbg¼Gþ,

Domðq1Þ ¼ fx2<3 : x340g [ Gþ,

Domðq2Þ ¼ fx2<3 : x350g [ G�,

Domðq3Þ ¼Sbs ,

ð8Þ

where Tþfb and T�fb are Tfb(x3) for x34 0 and x35 0,

respectively. The directed graph associated with this

DDS hybrid automaton is shown in Figure 1. The

guards are close to the departure locations, and the

reset functions are close to the arrival locations.The 3-discrete-state hybrid automaton proposed

here overcomes some non-determinism problems

encountered in other hybrid formulations of

Init

a

cc

b

b

a

Figure 1. Directed graph associated with the DDShybrid automaton HDDS1

for the drillstring withx0¼ (x1, x2, 0)

T.

6 E.M. Navarro-Lopez and R. Carter

Downloaded By: [The University of Manchester] At: 09:25 20 August 2010

Page 8: International Journal of Systems Science Hybrid automata ...staff.cs.manchester.ac.uk/~navarroe/papers/enavarro_ijss10.pdf · Hybrid automata: an insight into the discrete abstraction

discontinuous systems with sliding, for example, likethe one presented in Mattsson (1996) where an object-oriented model with three locations is used.

Now, the extended DDS hybrid automaton of fivediscrete states is considered for the example. Thediscontinuous element is the friction, which is nowconsidered as a combination of the switch model (Leineet al. 1998) and Karnopp’s model, in which a zerovelocity band is introduced (Karnopp 1985). Thus,

TfbðxÞ ¼

Teb ðxÞ if jx3j � �, jTeb j �Tsb (stick),

Tsb signðTebðxÞÞ if jx3j � �, jTeb j4Tsb

(stick-to-slip transition)

fbðx3Þsignðx3Þ if jx3j4� (sliding),

8>>><>>>:

ð9Þ

where �4 0, and Tebis the reaction torque, which

coincides with the equivalent control.The vector fields associated with q4( f

�s ðxÞ) and

q5 ( fþs ðxÞ) are obtained by considering in (7), x3¼ 0 and

Tfb ¼ maxsðueqÞsignðueqÞ ¼ Tsb signðTebÞ:

The discrete states, transitions, guards, locationdomains and reset functions are shown in the graphicalrepresentation of the hybrid dynamical system ofFigure 2. Note that, when we enter the stick location,we will not necessarily have x3¼ 0, so we reset to thisvalue on entry to stick.

The simulation results for these two hybrid modelsare given in Section 6.

5. Multiple discontinuity surfaces: composition of

DDS hybrid automata

In order to model discontinuous systems with severaldiscontinuity surfaces under the proposed framework,

in the example considered in Section 4, another

discontinuity surface is included, sr¼ 0, along which

the system exhibits desired dynamics. For this purpose,

a discontinuous control u is proposed so that the

system trajectory reaches the surface sr¼ 0 and enters

a sliding motion. Thus, the following controller is

considered (Navarro-Lopez and Liceaga-Castro 2009;

Navarro-Lopez 2009b):

srðx, tÞ ¼ ðx1 ��Þ þ

Z t

0

½x1ð�Þ ���d�

þ

Z t

0

½x1ð�Þ � x3ð�Þ�d�, 4 0,

u ¼ ctðx1 � x3Þ þ ktx2 þ crx1 � Jr½ðx1 ��Þ

þ ðx1 � x3Þ þ signðsrÞ�, 4 0, ð10Þ

where �4 0 is the desired top-rotary velocity. It is

ensured that sr(x, t) becomes zero in a finite time

interval tsr ¼jsrðx, t0Þj

. Two new states x4, x5 are defined,

such that, _x4 ¼ x1 �� and _x5 ¼ x1 � x3. The follow-

ing switching surface is defined: S r0 :¼ fx 2 <5 :

srðx, tÞ ¼ 0g. This surface has been designed in such a

way to be attractive for all x and to be a sliding set for

all x 2 S r0. Control u is of switched type, with the form:

u ¼uþ if sr 4 0

u� if sr 5 0,

�ð11Þ

obtaining uþ and u� by changing the sign of sr in (10).

From (10), the equivalent control associated with S r0 is

u�5 ureq 5 uþ, with

ureqðxÞ ¼ ctðx1 � x3Þ þ ktx2 þ crx1

� Jr ðx1 ��Þ þ ðx1 � x3Þ½ �: ð12Þ

Consequently, the dynamics on S r0 has the following

form:

_x ¼ f rs ðx, uÞ��u¼ureq

¼

�ðx1 ��Þ � ðx1 � x3Þ

x1 � x31

Jbctx1 þ ktx2 � ðct þ cbÞx3 � Tfbðx3Þ� �

x1 ��

x1 � x3

0BBBBBBB@

1CCCCCCCA:

In addition, control u has modified the dynamics on

Sb0, and

_x ¼ f bs ðxÞ ¼

�2x1 þ �� signðsrÞ

x1

0

x1 ��

x1

0BBBBBB@

1CCCCCCA:

Init a

b

da

a

cd

a

Figure 2. Directed graph associated with the extendedDDS hybrid automaton HDDS2

for the drillstring withx0¼ (x1, x2, 0)

T.

International Journal of Systems Science 7

Downloaded By: [The University of Manchester] At: 09:25 20 August 2010

Page 9: International Journal of Systems Science Hybrid automata ...staff.cs.manchester.ac.uk/~navarroe/papers/enavarro_ijss10.pdf · Hybrid automata: an insight into the discrete abstraction

In order to obtain the hybrid automaton associated

with the closed-loop system (7)–(10), we will make the

composition of several DDS hybrid automata. The

basic hybrid automaton HDDS1is used and the result is

a 9-location hybrid automaton described as follows.

Similar results would be obtained by using HDDS2.

The switching surfaces Sb0 and S r

0 divide the state

space in four regions where the system is smooth. For

each of these regions, a location is defined:

q1 ¼ fslipþb , slip

þr g, q2 ¼ fslip

þb , slip

�r g,

q3 ¼ fslip�b , slip

þr g, q4 ¼ fslip

�b , slip

�r g:

The domains and vector fields for each of these

locations are:

Domðq1Þ ¼ fx 2<5 : sbðxÞ40, srðx, tÞ40g[ ðGþ \Sr

þ

�¼ S r

þ \ ðSbþ [G

þ�,

Domðq2Þ ¼ fx 2<5 : sbðxÞ40, srðx, tÞ50g[ ðGþ \Sr

�¼ S r

� \ ðSbþ [G

þ�,

Domðq3Þ ¼ fx 2<5 : sbðxÞ50, srðx, tÞ40g[ ðG� \Sr

þ

�¼ S r

þ \ ðSb� [G

��,

Domðq4Þ ¼ fx 2<5 : sbðxÞ50, srðx, tÞ50g[ ðG� \Sr

�¼ S r

� \ ðSb� [G

��,

fq1 ¼

’1ðxÞ �

x1 � x3

’2ðxÞ �Tþfbðx3Þ

Jb

x1 ��

x1 � x3

0BBBBBBBB@

1CCCCCCCCA, fq2 ¼

’1ðxÞ þ

x1 � x3

’2ðxÞ �Tþfbðx3Þ

Jb

x1 ��

x1 � x3

0BBBBBBBB@

1CCCCCCCCA,

fq3 ¼

’1ðxÞ �

x1 � x3

’2ðxÞ �T�fbðx3Þ

Jb

x1 ��

x1 � x3

0BBBBBBB@

1CCCCCCCA, fq4 ¼

’1ðxÞ þ

x1 � x3

’2ðxÞ �T�fbðx3Þ

Jb

x1 ��

x1 � x3

0BBBBBBB@

1CCCCCCCA,

with G0, Gþ and G� as defined in (8), but with x2R5,

and

S rþ ¼ fx 2<

5 : srðx, tÞ40g, Sr� ¼ fx 2<

5 : srðx, tÞ50g,

Sbþ ¼ fx 2<

5 : x340g, Sb� ¼ fx 2<

5 : x350g:

In addition, ’1(x)¼�(x1��)� (x1� x3) and

’2ðxÞ ¼1Jb

ctx1þ½ ktx2� (ctþ cb)x3]. As we mentioned

previously for the 3-location hybrid automaton, we

have included the guards defined by G(qj, qi) in the

domains Dom(qi).

The second group of locations corresponds to

dynamics on the switching surfaces:

q5 ¼ fslipþb , stickrg, q6 ¼ fstickb, stickrg,

q7 ¼ fslip�b , stickrg, q8 ¼ fstickb, slip

þr g,

q9 ¼ fstickb, slip�r g:

The domains and vector fields for each of these

locations are:

Domðq5Þ ¼ fx 2 <5 : sbðxÞ40, srðx, tÞ ¼ 0g [ ðGþ \ S r

0

�¼ S r

0 \ ðSbþ [G

þ�,

Domðq6Þ ¼ G0 \S r0,

Domðq7Þ ¼ fx 2 <5 : sbðxÞ50, srðx, tÞ ¼ 0g [ ðG� \ S r

0

�¼ S r

0 \ ðSb� [G

��,

Domðq8Þ ¼ G0 \S rþ,

Domðq9Þ ¼ G0 \S r�,

fq5 ¼

’1ðxÞ

x1 � x3

’2ðxÞ �Tþfbðx3Þ

Jb

x1 ��

x1 � x3

0BBBBBBBB@

1CCCCCCCCA, fq6 ¼

�2x1 þ �

x1

0

x1 ��

x1

0BBBBBBB@

1CCCCCCCA,

fq7 ¼

’1ðxÞ

x1 � x3

’2ðxÞ �T�fbðx3Þ

Jb

x1 ��

x1 � x3

0BBBBBBB@

1CCCCCCCA, fq8 ¼

�2x1 þ ��

x1

0

x1 ��

x1

0BBBBBBB@

1CCCCCCCA,

fq9 ¼

�2x1 þ �þ

x1

0

x1 ��

x1

0BBBBBBB@

1CCCCCCCA,

with S r0 ¼ fx 2 <

5 : srðx, tÞ ¼ 0g.Some features of the system will be considered as

constraints in order to reduce the number of feasible

transitions between locations. The most important

characteristic is that the surface S r0 is attractive for all x

and that all trajectories reach S r0 in a finite time, and

once the trajectory reaches Sr0, it remains there.

Because of these facts, once the system reaches

locations q5, q6 and q7, its future transitions will be

restricted to these three locations. This can be consid-

ered as a desired recurrent loop. In addition, unfeasible

8 E.M. Navarro-Lopez and R. Carter

Downloaded By: [The University of Manchester] At: 09:25 20 August 2010

Page 10: International Journal of Systems Science Hybrid automata ...staff.cs.manchester.ac.uk/~navarroe/papers/enavarro_ijss10.pdf · Hybrid automata: an insight into the discrete abstraction

transitions are also the transitions involving a crossthrough S r

0 . Consequently, there are 36 feasible edgesor transitions:

Efea ¼ðq1,q8Þ, ðq1,q3Þ, ðq3,q1Þ, ðq3,q8Þ, ðq8,q1Þ, ðq8,q3Þ,

ðq3,q5Þðq5,q6Þ, ðq5,q7Þ, ðq7,q5Þ, ðq7,q6Þ, ðq6,q5Þ,

ðq6,q7Þ, ðq1,q7Þðq2,q9Þ, ðq2,q4Þ, ðq4,q2Þ, ðq4,q9Þ,

ðq9,q2Þ, ðq9,q4Þ, ðq9,q5Þ, ðq1,q5Þ, ðq8,q6Þ, ðq3,q7Þ,

ðq2,q5Þ, ðq9,q6Þ, ðq4,q7Þ, ðq9,q7Þ, ðq1,q6Þ, ðq2,q6Þ,

ðq3,q6Þ, ðq4,q6Þ, ðq8,q5Þ, ðq8,q7Þ, ðq2,q7Þ, ðq4,q5Þ:

In Figure 3, the graphical representation of theresulting hybrid control system is given. The 11symbols associated with the edges represent the 11types of guards in the hybrid automaton, that is:

a, G0 \ S r0 , b, G� \ S r

0 , c, Gþ \ S r0,

d, G0 \ S rþ, e, G� \ S r

þ, f, Gþ \ S rþ,

g, G0 \ S r�, h, G� \ S r

�, i, Gþ \ S r�,

j, Sb� \ S

r0 , k, Sb

þ \ Sr0 :

As is appreciated from Figure 3, the hybridcontrol system consists of three DDS hybrid automatarepresented by these three groups of locations:{q1, q8, q3}, {q5, q6, q7}, {q2, q9, q4}.

6. Simulation of the hybrid automata: Modelica

versus Stateflow

Stateflow� under Simulink� in MATLAB� and TheMathWorks (2008) and Modelica� (Modelica 2009)under Dymola1 are the software packages used tosimulate the three DDS hybrid automata for

the example. Firstly, a comparison of Stateflow andModelica results is presented for the 3-location and5-location hybrid automata. Secondly, for the9-location hybrid automaton, having proved thatModelica is much superior, the simulations withModelica are given.

6.1. Comparing Stateflow and Modelica for the basichybrid models

The translation of the hybrid automata HDDS1and

HDDS2into Stateflow charts is almost immediate. The

Stateflow charts obtained look the same as the directedgraphs associated with HDDS1

and HDDS2given in

Figures 1 and 2. Only, in the Stateflow chart forHDDS1,

an additional boolean variable is introduced. Due tothe difficulty in detecting the zero-crossing of thefunctions involved, x3¼ 0 is checked by means of thecondition novelocity¼¼ 1. The boolean variable nove-locity is obtained by passing x3 through the ThresholdSimulink block, and it is an external input to theStateflow chart. This boolean variable is not necessaryin HDDS2

. The Simulink/Stateflow models for HDDS1

and HDDS2are shown in Figures 4 and 5, respectively.

The simulations under Stateflow� and Modelica�

of the two basic hybrid automata are compared withthe simulation of the discontinuous system (7) with thefriction model (9) in Figures 6–10. For the simulationof the discontinuous model, the integration functionused is ode45 of MATLAB�, and in order to have it asan accurate reference trajectory, the maximum step sizeand the tolerance are considered as 10�8. The systemparameters used for the simulations are:

Jr ¼ 2122 kgm2, Jb ¼ 471:9698 kgm2,

Rb ¼ 0:155575m, kt ¼ 861:5336Nm=rad,

ct ¼ 172:3067Nms=rad, cr ¼ 425Nms=rad,

cb ¼ 50Nms=rad, �cb ¼ 0:5,

�sb ¼ 0:8, � ¼ 10�6, �b ¼ 0:9, vf ¼ 1:

ð13Þ

From the figures, it can be seen how the hybridautomata reproduce the three main types of bitdynamical behaviour: positive velocity equilibrium,permanently stuck bit and stick–slip motion. Firstly,Figure 6 shows the positive velocity behaviour, whichis such that the bit velocity converges to a positiveequilibrium value, the same as the velocity of the top ofthe bit. The second behaviour (permanently stuck bit)occurs when the bit stops rotating after a period oftime and never starts again, i.e. xðtÞ 2 Sb

0 8t4 ts, forsome ts4 0 (Figure 7). Finally, Figure 8 shows stick–slip motion of the bit, which is where the bit velocity(x3) oscillates between zero and positive velocity; thesystem enters and leaves repeatedly the sliding mode.

Figure 3. Graphical representation of the hybrid automatonfor the closed-loop drillstring using the DDS hybrid autom-aton HDDS1

.

International Journal of Systems Science 9

Downloaded By: [The University of Manchester] At: 09:25 20 August 2010

Page 11: International Journal of Systems Science Hybrid automata ...staff.cs.manchester.ac.uk/~navarroe/papers/enavarro_ijss10.pdf · Hybrid automata: an insight into the discrete abstraction

We should note that, in the evolution of q inHDDS2,

it appears that we have an impulse when we changefrom q¼ 3 to q¼ 1 via q¼ 5. When q¼ 3 and ueqbecomes greater than Tsb

, there is a change to q¼ 5.However, this location corresponds to values of x3such that jx3j5 �, and since x3 immediately starts to beincreased when we enter this location, it very soonbecomes large enough to leave this location. Hence, wehave this impulsive-type q evolution.

6.2. Choosing the step size and tolerance

Several features are observed from the simulations, thefirst of which is the importance of the step size and thetolerance used in the numerical integration method.

These two parameters have more impact on the

Stateflow simulations than on the Modelica ones.

For the Stateflow simulations, the function ode45 of

MATLAB� is used, which is a variable-step integra-

tion method. The maximum step size is changed in

order to appreciate its effect on the system solutions

obtained. In the case of Modelica, the only parameter

of the integrator that can be changed within Dymola is

the tolerance. Taking the tolerance to be too large can

lead to incorrect long-term dynamical behaviour being

seen, as we find is the case with either step size or

tolerance being too large in the Stateflow simulations.In Figures 6–8, the simulations obtained with

Modelica and Stateflow are presented. The trajectories

obtained in both cases are very similar. For the

Figure 4. The Simulink/Stateflow model for HDDS1.

10 E.M. Navarro-Lopez and R. Carter

Downloaded By: [The University of Manchester] At: 09:25 20 August 2010

Page 12: International Journal of Systems Science Hybrid automata ...staff.cs.manchester.ac.uk/~navarroe/papers/enavarro_ijss10.pdf · Hybrid automata: an insight into the discrete abstraction

Stateflow simulations, the maximum step size ish¼ 0.001 s, the minimum step size is 10�5 s, and thetolerance is tol¼ 0.001. With this h, the trajectoriesof the two hybrid automata coincide for the threedynamical behaviours. In Stateflow, when h is smallenough, the impact of the tolerance in the solutions isminor. For Modelica simulations, a tolerancetol¼ 10�4 is used, except for the situation shown inFigure 6, in which tol¼ 10�8 must be used in order toreduce the difference between the trajectory obtainedand the ones obtained with Stateflow. This tolerance issmall enough to obtain accurate behavioural results,but higher tolerances do produce slightly differentvalues for the maximum and minimum amplitudes afterthe last entry into the discontinuity surface.

In Stateflow, differences in the simulations appearwhen the maximum step size, h, is not small enough.

In addition, the larger the number of entries into thediscontinuity surface is, that is, the larger the numberof transitions between discrete locations is, the largerthe difference between the two hybrid trajectories givenby HDDS1

and HDDS2is, and the larger the difference

between the hybrid trajectories and the trajectory ofsystem (7)–(9) is. See Figures 9 and 10, where h¼ 2 swas used. This fact is especially visible in Figure 9(a),where a small tolerance of tol¼ 10�8 is used for thetwo hybrid automata. In this case, the 5-locationhybrid automaton gives stick–slip oscillation, andalthough the 3-location automaton converges to theequilibrium, the convergence is delayed in time.This case displays such differing behaviour due to thecombination of Wob and u, since these parametersput the trajectory close to the bifurcation leading tostick–slip.

Figure 5. The Simulink/Stateflow model for HDDS2.

International Journal of Systems Science 11

Downloaded By: [The University of Manchester] At: 09:25 20 August 2010

Page 13: International Journal of Systems Science Hybrid automata ...staff.cs.manchester.ac.uk/~navarroe/papers/enavarro_ijss10.pdf · Hybrid automata: an insight into the discrete abstraction

In the stuck situation of Figure 9(b), a tolerancetol¼ 10�4 is used for the two hybrid automata. Thedifference between the discontinuous model simulationand the 5-location hybrid automaton simulation isgreater than the difference between the discontinuous

)

Figure 6. Trajectories obtained with Stateflow andModelica. Convergence to the equilibrium entering severaltimes the switching surface for the three systems: u¼ 6 kNm,Wob¼ 51,408N. For Stateflow, the maximum step sizeh¼ 0.001 s, the minimum step size is 10�5 s and tol¼ 0.001.For Modelica, tol¼ 10�8.

)

Figure 7. Trajectories obtained with Stateflow andModelica. Permanent stuck bit for the three systems:u¼ 6 kNm, Wob¼ 60 kN. For Stateflow, the maximum stepsize h¼ 0.001 s, the minimum step size is 10�5 s andtol¼ 0.001. For Modelica, tol¼ 10�4.

)

Figure 8. Trajectories obtained with Stateflow andModelica. Stick-slip situation for the three systems:u¼ 6 kNm, Wob¼ 53018N. For Stateflow, the maximumstep size h¼ 0.001 s, the minimum step size is 10�5 s andtol¼ 0.001. For Modelica, tol¼ 10�4.

(a)

(b)

))

Figure 9. Comparison of Stateflow simulations. Use of amaximum step size h¼ 2 s in the numerical integrationmethod: (a) Convergence to the equilibrium: u¼ 6 kNm,Wob¼ 51,408N, tol¼ 10�8, (b) permanent stuck bit:u¼ 6 kNm, Wob¼ 60 kN, tol¼ 10�4.

12 E.M. Navarro-Lopez and R. Carter

Downloaded By: [The University of Manchester] At: 09:25 20 August 2010

Page 14: International Journal of Systems Science Hybrid automata ...staff.cs.manchester.ac.uk/~navarroe/papers/enavarro_ijss10.pdf · Hybrid automata: an insight into the discrete abstraction

model simulation and the 3-location automaton sim-ulation. Finally, in Figure 10, although a tolerance oftol¼ 10�8 is used for the two hybrid automata, the lackof specific restriction on the step size means that thereare visible differences between the different trajectories.This latter plot shows the importance of specifyingsensible limits on the step size.

The plot in Figure 11 shows an example of theModelica simulations for these hybrid automata whenthe tolerance is too large. The 3- and 5-locationautomata need a tolerance of 10�4 in order to achievethe correct long-term behaviour with u¼ 6 kNm andWob¼ 51,408N. This plot shows the result if a toler-ance of 10�3 is used instead. Note that, although thesimulated long-term behaviour can change when near abifurcation point, it is fairly resilient to changes under

Modelica, provided enough accuracy is used. This is

due to the Modelica integrator, LSODAR, which has a

root finder, and so finds points where the location

changes much better than MATLAB’s ode45.Using the Modelica language, rather than

MATLAB’s Stateflow, is much quicker for simulation

of these hybrid automata systems. For example, on the

same computer, for the highest accuracy needed in this

article, the Stateflow simulation took roughly 100 s to

compute a 100 s time span of result, whereas the

comparable Modelica simulation took roughly 10 s tocompute this 100 s time span of result. Added to this,

most of the time taken by Modelica was used to

compile the Modelica language code into C-code,

which means that the time barely increases for any

longer result interval. However, the majority of the

time taken by Stateflow is used for the integration over

the interval itself, so time for any longer interval

increases proportionately. These observations show

that simulations using the Modelica language are

generally much more efficient than using Stateflow.The overall picture is that Modelica can produce

more accurate results in much shorter time, and so is

usually better for simulations of hybrid-automaton

systems, specially as these systems become larger.

Given this conclusion, Modelica is used for the

simulation of the automaton introduced in Section 5,

which is a composition of three DDS hybrid automata.

6.3. Simulation results with Modelica for thecomposition of several DDS hybrid automata

The hybrid automaton introduced in Section 5 is now

simulated, using the Modelica language through

Dymola. The purpose of this hybrid automaton, as

mentioned before, is to modify the input motor torque,

u, so that the desired dynamics is seen in the drillstring

system. However, the desired behaviour (convergence

to equilibrium with positive velocity) is still only

obtained under certain conditions which relate the

weight on the bit (Wob), the desired rotary velocity (�)

and the parameter . The permanently stuck bitbehaviour is eliminated by this hybrid automaton

(Navarro-Lopez and Liceaga-Castro 2009), so the only

possibilities for long-term behaviour are convergence

to equilibrium and stick–slip motion.The first consideration to be made is of the two

possible behaviour types that can be seen. The simu-

lations of this hybrid automaton use parameters (13),

along with ¼ 0.3 and ¼ 1. Figure 12 depicts these

behaviour patterns, with the left-hand plots showing

the stick–slip behaviour, and the right-hand plotsshowing the convergence to equilibrium behaviour.

Vel

ociti

es (

rad/

s)

Time (s)

0 5 10 15 20 25 30 35 400

1

2

3

4

5

6

Figure 10. Comparison of Stateflow simulations with max-imum step size h¼ 2 s, tol¼ 10�8: Stick-slip situation withu¼ 6 kNm, Wob¼ 53,018N.�� _’b obtained with HDDS1

, - -_’b obtained with HDDS2

, – _’b of system (7)–(9), � � � _’r.

0 10 20 30 40 50 60 70–1

0

1

2

3

4

5

6

7

Time (s)

Vel

ocity

of b

it (r

ad/s

)

Figure 11. The effect of the tolerance in Modelica’sLSODAR integration algorithm for u¼ 6 kNm,Wob¼ 51,408N. Plot shows the reference discontinuoussystem simulation (—) against the 3- and 5-location autom-ata models (— �—), with tolerance 10�3.

International Journal of Systems Science 13

Downloaded By: [The University of Manchester] At: 09:25 20 August 2010

Page 15: International Journal of Systems Science Hybrid automata ...staff.cs.manchester.ac.uk/~navarroe/papers/enavarro_ijss10.pdf · Hybrid automata: an insight into the discrete abstraction

Having noted the appearance of the time evolution,it is interesting to look at the overall trend of long-termbehaviour for this hybrid automaton. To do this, theparameters Wob (weight on the bit) and � (desiredrotary velocity) have both been varied. The plot of thelong-term behaviour pattern for each pair of param-eters is given in Figure 13.

From this plot, it is clear that the region ofconvergence to positive velocity is any value of �above a curve dependent on Wob. It is interesting tonote that the equation for the boundary line can be

calculated (Navarro-Lopez and Liceaga-Castro 2009);in general, it is dependent on the value of , and theother typical parameters of the drillstring. However,the equation of the boundary does not change with ,since this only affects the speed of the controlledconvergence to the long-term behaviour. These equa-tions for the region of convergence to positive velocitymean that, provided the values of the parameters areknown and provided the possible range of weight onthe bit is known, the safe values for the desired velocitycan be calculated. This calculation could also be madethe other way round, so that possible values fordesired velocity would specify a safe range for weighton the bit.

7. Conclusions

The DDS hybrid automaton and the extended DDShybrid automaton are defined in this article in order toreinterpret a class of discontinuous systems withseveral switching surfaces, inputs and outputs withinthe hybrid-automaton framework. An example is usedto illustrate the models proposed. It is a simplifiedtorsional model of a drillstring including discontinuousfriction and sliding-mode control. This article is astepping stone of hybrid modelling of DDSs. Underthe framework proposed, the control design, as well asthe complex behaviours associated with discontinuoussystems can be abstracted from a computationalviewpoint.

2 3 4 5 6 7 8

µ104

0

0.5

1

1.5

2

2.5

3

3.5

4

Wob (N)

W (r

ad/s

)

Figure 13. Long-term behaviour for the 9-location autom-aton obtained with Modelica simulations. : stick–slipbehaviour; þ: positive velocity.

Time (s) Time (s)

Time (s) Time (s)

q q

Figure 12. Bit velocity and location evolution for the two different long-term behaviour patterns. Both cases use Wob¼ 53018N.The stick–slip behaviour is depicted in the two plots on the left, and is obtained with �¼ 2 rad/sec. The convergence toequilibrium behaviour is shown in the two plots on the right, and is obtained with �¼ 3 rad/sec.

14 E.M. Navarro-Lopez and R. Carter

Downloaded By: [The University of Manchester] At: 09:25 20 August 2010

Page 16: International Journal of Systems Science Hybrid automata ...staff.cs.manchester.ac.uk/~navarroe/papers/enavarro_ijss10.pdf · Hybrid automata: an insight into the discrete abstraction

Acknowledgements

The first author is grateful for the support of the ResearchCouncils United Kingdom (RCUK) through the FellowshipEP/E500048/1. The authors also gratefully acknowledge thereviewers’ valuable suggestions, which have improved thefinal paper version.

Notes on contributors

Eva M. Navarro-Lopez has been aLecturer/RCUK Academic Fellow atthe School of Computer Science at theUniversity of Manchester sinceSeptember 2008. Having a MEng inComputer Science and PhysicsSystems Engineering, with a speciali-sation in Space Dynamics andCelestial Mechanics in the

Universidad de Alicante, she completed a PhD in Control andIndustrial Electronics at the Universitat Politecnica deCatalunya in Barcelona in 2002. From 1996 to 2000, sheworked for the Consejo Superior de Investigaciones Cientıficas(CSIC) of Spain at the Instituto de Automatica Industrial inMadrid and in the Instituto de Robotica e InformaticaIndustrial in Barcelona. After her PhD, she worked at theInstituto Mexicano del Petroleo in Mexico D.F., forming andleading a group on modelling, analysis and control ofdiscontinuous dynamical systems and mechanical vibrationsin oilwell drillstrings. In recognition of her contributions toresearch, since 2003, she has been awarded the membershipof the Mexican National Research System (the national bodyfor eminent scientists). From 2006 to 2008, she held a Ramony Cajal Fellowship for outstanding researchers from theSpanish Government. Her current research topics arefocused on modelling, analysis and control of hybriddynamical systems and complex networks.

Rebekah Carter received her MMathin Mathematics from the University ofOxford in 2008, with first class hon-ours. Since then she has completed anMSc with Distinction in Mathematicsand Computational Science at theUniversity of Manchester, and wasawarded the NAG prize as the topstudent in the class. She is now

continuing with her studies at Manchester, working towardsher PhD degree in the area of hybrid dynamical systems. Herresearch interests include modelling, verification and controlof hybrid systems, and the use of theoretical computerscience in new areas.

Note

1. Dymola: Dynamic Modelling Laboratory. www.dynasim.se/index.htm.

References

Acary, V., and Brogliato, B. (2008), Numerical Methods for

Nonsmooth Dynamical Systems: Applications in Mechanicsand Electronics (Vol. 35), Lecture Notes in Applied and

Computational Mechanics, Heidelberg: Springer-Verlag.

Agrawal, A., Simon, G., and Karsai, G. (2004), ‘SemanticTranslation of Simulink/Stateflow Models to Hybrid

Automata using Graph Transformations’, ElectronicNotes in Theoretical Computer Science, 109, 43–56.

Alur, R., Courcoubetis, C., Henzinger, T.A., and Ho, P.H.

(1993), Hybrid Automata: an Algorithmic Approach to theSpecification and Verification of Hybrid Systems (Vol. 736),Lecture Notes in Computer Science, Berlin: Springer,

pp. 209–229.Alur, R., Kanade, A., Ramesh, S., and Shashidhar, K.C.(2008), ‘Symbolic Analysis for Improving Simulation

Coverage of Simulink/Stateflow Models’, in 8th ACMand IEEE International Conference on Embedded software,EMSOFT 2008, Atlanta, USA, 19–24 October 2008,

pp. 19–24.Antsaklis, P.J., Stiver, J.A., and Lemmon, M.D. (1993),Hybrid System Modelling and Autonomous Control Systems

(Vol. 736), Lecture Notes in Computer Science, New York:Springer, pp. 366–392.

Awrejcewicz, J., and Lamarque, C. (2003), Bifurcations and

Chaos in Non-smooth Mechanical Systems (Vol. 45),Singapore: World Scientific Series on Nonlinear Science,Series A.

Branicky, M.S., Borkar, V.S., and Mitter, S.K. (1998),‘A Unified Framework for Hybrid Control: Model andOptimal Control Theory’, IEEE Transactions on Automatic

Control, 43, 31–45.Brockett, R.W. (1988), ‘On the Computer Control ofMovement’, in 1988 IEEE Conference on Robotics and

Automation, New York, USA, April 1988, pp. 534–540.Brogliato, B. (1999), Nonsmooth Mechanics, London:Springer-Verlag.

Buss, M., Glocker, M., Hardt, M., von Stryk, O., Bulirsch,R., and Schmidt, G. (2002), ‘Nonlinear Hybrid DynamicalSystems: Modelling, Optimal Control, and Applications’,

in Modelling, Analysis and Design of Hybrid Systems,Vol. 279 of NCIS, eds. S. Engell, G. Frehse, andE. Schnieder, Berlin: Springer-Verlag, pp. 311–335.

Carter, R. (2009), ‘Computational Model of a Rotary Systemwith Discontinuous Elements’, Msc Dissertation, TheUniversity of Manchester, Manchester, UK.

di Bernardo, M., Budd, C., Champneys, A., andKowalczyk, P. (2008), Piecewise-smooth DynamicalSystems. Theory and Applications, London: Springer-

Verlag.Egerstedt, M., and Brockett, R.W. (2003), ‘Feedbackcan Reduce the Specification Complexity of Motor

Programs’, IEEE Transactions on Automatic Control, 48,213–223.

Elmqvist, H., Cellier, F.E., and Otter, M. (1993), ‘Object-oriented Modelling of Hybrid Systems’, European

Simulation Symposium, The Netherlands: Delft, pp. 31–41.Filippov, A.F. (1988), Differential Equations withDiscontinuous Right-hand Sides, Dordrecht: Kluwer

Academic Publishers.Forbus, K.D. (1984), ‘Qualitative Process Theory’, ArtificialIntelligence, 24, 85–168.

Henzinger, T.A. (1996), ‘The Theory of Hybrid Automata’,in 11th IEEE Symposium of Logic in Computer Science,pp. 278–292.

International Journal of Systems Science 15

Downloaded By: [The University of Manchester] At: 09:25 20 August 2010

Page 17: International Journal of Systems Science Hybrid automata ...staff.cs.manchester.ac.uk/~navarroe/papers/enavarro_ijss10.pdf · Hybrid automata: an insight into the discrete abstraction

Johansson, K.H., Egerstedt, M., Lygeros, J., and Sastry, S.(1999), ‘On the Regularization of Zeno Hybrid Automata’,

Systems and Control Letters, 38, 141–150.Karnopp, D. (1985), ‘Computer Simulation of Stick-SlipFriction in Mechanical Dynamic Systems’, ASME Journalof Dynamic Systems, Measurement, and Control, 107,

100–103.Kuipers, B. (1986), ‘Qualitative Simulation’, ArtificialIntelligence, 29, 289–338.

Kunze, M. (2004), Non-smooth Dynamical Systems(Vol. 1744), Lecture Notes in Mathematics, Berlin/Heidelberg: Springer-Verlag.

Kuznetsov, Y.A., Rinaldi, S., and Gragnani, A. (2003), ‘One-parameter Bifurcations in Planar Filippov Systems’,International Journal of Bifurcations and Chaos, 13,2157–2188.

Leine, R.I., van Campen, D.H., de Kraker, A., and van denSteen, L. (1998), ‘Stick-Slip Vibrations Induced byAlternate FrictionModels’,Nonlinear Dynamics, 16, 41–54.

Lotstedt, P. (1991), ‘Coulomb Friction in Two-dimensionalRigid Body Systems’, Zeitschrift fur AngewandteMathematik und Mechanik, 64, 605–615.

Lygeros, J., Johansson, K.H., Simic, S.N., Zhang, J., andSastry, S. (2003), ‘Dynamical Properties of HybridAutomata’, IEEE Transactions on Automatic Control, 48,

2–17.Lygeros, J., Tomlin, C., and Sastry, S. (1999), ‘Controllersfor Reachability Specifications for Hybrid Systems’,Automatica, 35, 349–370.

Mattsson, S.E. (1996), ‘On Object-Oriented Modellingof Relays and Sliding Mode Behaviour’, in 13th TriennialIFAC World Congress, San Francisco, USA, pp. 259–264.

Modelica (2009), ‘Modelica� – A Unified Object-OrientedLanguage for Physical Systems Modeling’. www.modelica.org/documents/ModelicaSpec31.pdf

Mosterman, P.J., and Biswas, G. (2000), ‘A ComprehensiveMethodology for Building Hybrid Models of PhysicalSystems’, Artificial Intelligence, 121, 171–209.

Mosterman, P.J., Zhao, F., and Biswas, G. (1999), ‘SlidingMode Model Semantics and Simulation for HybridSystems’, in in Hybrid Systems V, Vol. 1567 of LNCS,eds. Antsaklis, et al., Berlin: Springer-Verlag, pp. 218–237.

Navarro-Lopez, E.M. (2009a), ‘An AlternativeCharacterization of Bit-sticking Phenomena in a Multi-Degree-of-Freedom Controlled Drillstring’, Nonlinear

Analysis: Real World Applications, 10, 3162–3174.Navarro-Lopez, E.M. (2009b), ‘What Makes the Control ofDiscontinuous Dynamical Systems so Complex?’,

in Mathematical Problems in Engineering, Aerospace andSciences, An International Series of Scientific Monographsand Text Books, ed. S. Sivasundaram, UK: CambridgeScientific Publishers, pp. 63–83 (to appear).

Navarro-Lopez, E.M. (2009c), ‘Hybrid Modelling of aDiscontinuous Dynamical System Including SwitchingControl’, in 2nd IFAC Conference on Analysis and

Control of Chaotic Systems Proceedings, IFAC, London,UK, 22–24 June 2009c, pp. 1–6.

Navarro-Lopez, E.M. (2009d), ‘Hybrid-Automaton Modelsfor Simulating Systems with Sliding Motion: Still a

Challenge’, in 3rd IFAC Conference on Analysis andDesign of Hybrid Systems Proceedings, IFAC, Zaragoza,Spain, 16–18 September 2009d, pp. 322–327.

Navarro-Lopez, E.M., and Cortes, D. (2007),

‘Avoiding Harmful Oscillations in a Drillstring ThroughDynamical Analysis’, Journal of Sound and Vibration, 307,152–171.

Navarro-Lopez, E.M., and Liceaga-Castro, E. (2009),‘Non-desired Transitions and Sliding-mode Control ofa Multi-DOF Mechanical System with Stick-

Slip Oscillations’, Chaos, Solitons and Fractals, 41,2035–2044.

Park, T., and Barton, P.I. (1996), ‘State Event Location inDifferential-algebraic Models’, ACM Transactions on

Modeling and Computer Simulation, 6, 137–165.Sedghi, B. (2003), ‘Control Design of Hybrid Systems viaDehybridization’, Ph.D. Dissertation, Ecole Polytechnique

Federale de Lausanne, Lausanne, Switzerland.Sedghi, B., Srinivasan, B., and Longchamp, R. (2002),‘Control of Hybrid Systems via Dehybridization’,

in American Control Conference, Anchorage, USA, 8–10May 2002, pp. 692–697.

Stursberg, O. (2006), ‘Supervisory Control of Hybrid

Systems Based on Model Abstraction and GuidedSearch’, Nonlinear Analysis, 65, 1168–1187.

Tavernini, L. (1987), ‘Differential Automata and theirDiscrete Simulators’, Nonlinear Analysis, Theory,

Methods and Applications, 11, 665–683.The MathWorks, I. (2008), ‘Stateflow and Stateflow CoderUser’s Guide. For Complex Logic and State Diagram

Modeling. www.mathworks.com/access/helpdesk_r13/help/pdf_doc/stateflow/sf ug.pdf

Utkin, V.I. (1992), Sliding Modes in Control Optimization,

Berlin: Springer-Verlag.van der Schaft, A.J., and Schumacher, J.M. (2000), AnIntroduction to Hybrid Dynamical Systems, London:

Springer-Verlag.Witsenhausen, H.S. (1966), ‘A Class of Hybrid-stateContinuous-time Dynamic System’, IEEE Transactionson Automatic Control, AC-11, 161–167.

Woods, E.A. (1991), ‘The Hybrid Phenomena Theory’,in 12th International Joint conference of ArtificialIntelligence, Los Altos, CA: Morgan Kaufman (1991),

pp. 71–76.Ye, H., Michel, A.N., and Hou, L. (1998), ‘Stability Theoryfor Hybrid Dynamical Systems’, IEEE Transactions on

Automatic Control, 43, 461–474.Zhang, F., Yeddanapudi, M., and Mosterman, P.J.(2008), ‘Zero-crossing Location and DetectionAlgorithms for Hybrid System Simulation’, in 17th

IFAC Triennial World Congress, Seoul, Korea, 6–11July 2008, pp. 7967–7972.

Zhao, F., and Utkin, V.I. (1996), ‘Adaptive Simulation and

Control Variable-structure Control Systems in SlidingRegimes’, Automatica, 32, 1037–1042.

16 E.M. Navarro-Lopez and R. Carter

Downloaded By: [The University of Manchester] At: 09:25 20 August 2010