Internati o nal  Journal of Ele c trical   and Computer  Engineering  (IJE CE)  Vol.  5, No. 6, Decem ber  2015, pp. 1396~ 1 406  I S SN : 208 8-8 7 0 8            1 396     Jo urn a l  h o me pa ge : h ttp ://iaesjo u r na l.com/ o n lin e/ind e x.ph p / IJECE  Using H y b r i d  Automata f o r Di agn osis of  Hybrid Dynamical   Systems      L o t f i  M h am di *, L o bn a B e l k acem *,  Hedi   Dh oui b i * , Z i neb Si meu  Ab a z i **   * LARATSI, National Eng i neeri ng School of  Mo nastir, Tunisia  ** G-SCOP, Grenoble- IPN/UJF- Grenoble 1, CN RS, France      Article Info    A B STRAC T Article histo r y:  Received Apr 3, 2015  Rev i sed  Ju l 15 20 15  Accepte d Aug 1, 2015      P h y s ica l  s y s t em s  can fa il.  F o r t h is  reas on th problem  of iden tif ying  and   reac ting to f a ul t s  has  receiv e d a  large  att e ntion  i n  the con t rol an d com puter   science com m unities .  In th is pap e r we stud y  th fault d i agnosis p r oblem  and  modeling of H y brid D y namical  S y stems  (HDS).  Generally  speaking,  HDS is   a s y stem mixing  continuous  and  discrete  b e hav i ors that canno be faithfully   modeled neith er b y  using formalism  with  continu ous dy n a mics only  nor b y   formalism including only  discr e te  d y namics.  We use the well known   framework of hy brid  automata  for m odeling h y brid s y stems, because th ey   combine the co ntinous and dis c retes pa rts on  the same structure. H y brid   autom a ton is   a s t at es -trans i t i ons   graph, wh ose d y n a mic  evolution  is  represented b y   discretes and  continous  steps  alternations, also, con tinous   evolution happ ens in the automaton ap exes,  while discrete evolution is   realized  b y   trans itions crossing ( a rcs) of  the grap h. Th eir  simulation presents   man y  problems mainly  the s y nchron isation between  th e two models.   Stateflow ,  used  to describ e  the  discret e  m odel, i s  co-ordinat ed  with Matlab ,   used to des c ribe the  continuous  model.  Th is article is a descrip t ion of a  cas stud y ,  which  is  a two tanks s y stem.  Keyword:  Diagnosis  Hy bri d  dy nam i cal   sy st em   Hyb r i d  au to m a ta    Copyright Ā©  201 5 Institut e  o f   Ad vanced  Engin eer ing and S c i e nce.  All rights re se rve d Co rresp ond i ng  Autho r Lo tfi M h am d i ,   LAR A TSI ,  Na t i onal   E ngi neer i ng Sch o o l   o f  M onast i r ,   Un i v ersity of  Mo n a stir,  M onast i r , T uni si a.  Em ail: lotfienim @ yahoo.fr       1.   INTRODUCTION   In m oder n  co m p l e x sy st em s cont i n uo us a n d di scret e  dy n a m i cs i n t e ract . Thi s  i s  t h e case of wi de  m a nufact uri n g   pl ant s ,  age n t s  s y st em s, robotic s and  physical plants.  Thi s   ki n d   of sy st em s, cal l e d h y b ri d i n  t h ei b e havi ou r,  nee d s a sp eci fi c formalis m   to be a n alysed.  In  or der  t o  m ode l  and  s p eci fy   hy b r i d  sy st em s i n  a  f o rm al way ,  t h not i on  o f   hy bri d  aut o m a t a  has  bee n   in tr odu ced [1 ], [2 ].   In t u itiv ely, a h y b r id  au to m a t o n  is a ā€œ fi n ite-state au to m a to n ā€  with  co n tinu o u s   v a riab les th at ev o l ve  according to dynamics chara c terizing eac h discrete state.  In the last years, a wi de spectrum  of  m odeling  form al is m  [3 an d  algorith m i c tech n i qu es has b een  stud ied  in  th e con t rol an d  co m p u t er scien ce co mmu n ities  t o  s o l v e t h pr obl em s of  si m u l a t i on,  ve ri fi catio n  an d con t ro l syn t h e sis for h ybr id systems [4 ],  [5 ].  The c ont r o l  a l go ri t h m s  are gene ral l y  dev e l ope d co nsi d eri n g t h at  t h e  sy st em  wor k s i n  n o rm al  situ atio n ,   i.e. is n o t   fau lty. Un fo rt u n a tely,  wh en  fail u r es  o ccur, t h ese alg o rith m s  b ecome in efficien an d  ev en  d a ng erou for  th e system  i t self or its env i ron m en t. In   or d e r  to   r each   h i gher  perf or m a n ces and  m o r e  r i go rou s   security s p ecifi cations, a Failure  Detection a n Isol at i o (F D I)  [ 6 ]  sy st em  has t o   be i m pl em ent e d.     In  th is p a p e we con cen trate ou r atten tion  t o  t h p r ob lem   o f  fau lt d e tecti o n an d iso l ation   for  h ybrid  syste m s.  Evaluation Warning : The document was created with Spire.PDF for Python.
I J ECE   I S SN 208 8-8 7 0 8        Using  H y b r i d  Au toma ta  f o Diag no sis  o f   Hyb r id Dyna mica l S y stems (Lo t fi Mh amd i 1 397 Th e literature i n  th at  field  is  ab und an t and   d i fferen t  so l u tio n s  h a v e   b e en p r op osed   fo ex am p l e th app r oach  of  [ 7 ] ,  t h i s  m e t hod o f  m odel - ba sed F D I al go ri t h m s   i s  t o  co m p are t h e exp ect ed be havi or  of t h e   sy st em , gi ve by  a m odel   wh i c h i s  m odel e d  by   hy b r i d  a u t o m a t a , wi t h  i t s  act ual   beha vi o r k n o w n t h ro u g h  t h e   onl i n o b ser v a t i ons.  AR R - ba sed resi du al s are i ndi cat ors  of  beha vi o r s a n d  t hus m a y  be used f o FD I:  t h ey  are   eq u a l to  zero  in  no rm al (n o -fau lt) situ atio n s  an d  d i ff eren t fro m  zero  wh en  th e fau lts they are sen s itiv e to o ccur.  A stru ct u r ed  set of resid u a l, i.e. a set  o f   residu als that are no t sen s itiv e to  th e same su b s ets  o f   fau lts,  m a y  be use d  t o  i s ol at e t h fa ul t s In th e con t ex o f  ou work,  we con s id er a d i ag no stic system  b a sed  on con t ro l of t h e execu tio n tim e   o f  th e task s during  th o p e ratio n of t h e syst e m ; g i v e n th at  th e system  o p e ratio n correspon d s  to th e ex ecu tion  of al l  t a sks of  t h e pr ocess f o r w e l l - de fi ne d t i m e  i n t e rval s. Thi s  m e t h o d  i s  based  on  a general  m odel i n g   ap pro ach   u s i n g   h y b r i d  au tomata. Th is tem p o r al  m o d e l  is u s ed  to   fau lt d e tectio n an d iso l atio n the faster  p o s sib l e an d wh o d i ag no ses  m o re p r ecisely as po ssi b l e b y  find ing   fau lt syste m  co m p o n en ts will  b e  presen ted  by  u s i n g St at efl o w c ont r o l l er.  In dee d ,  i f  t h di ag n o sis is fast and  t h failed  co mp on en t is id en tified ,   m a i n t e nance  o p erat i o ns ca b e  m a de  m o re q u i c kl y .     The pape i s  or gani ze as fol l ows .   Sect i o n 2 desc ri bes t h e  h y b ri dy nam i cal  sy st em   m odel  i n  n o rm al   ope rat i n g co nd i t i on by  hy b r i d  aut o m a t a . In  Sect i on 3,  we  expl ai n t h o b ject i v e of  ou r  di agn o st i c  ap pr oac h   base on  hy bri d  m odel .   The   t w o t a n k s sy st em  i s  co nsi d e r ed i n  sect i o 4 t o  s h o w  t h effect i v e n ess  o f   ou r   diagnosis approach.  At the e n d ,  a con c lusion is presen ted   with  so m e  p e rspectiv es.      2.   MODELLING OF HYBRID SYSTE M   Tw o cl asses o f  hy bri d  m odel  are di st i n gui s h ed [ 8 ] .   The  first class, known as integrated form alis m ,   ex tend o n e  of th e m o d e ls (discrete o r  con tin uou s) in   or de r t o  s p eci fy  a n descri be t h sy st em . The se con d   class o f  m o d e ls co -o rd in ate th e d i screte m o d e l an d  th e con tin uou s on e; th is is th e ap pro a ch  th at we  h a v e   taken. T h is c h oice is due t o  the fact that usi ng a  m odel for each com p one n t reta ins the s p ecification  potential  of eac h d o m a in. C o nt i n uo us  and  di scret e  as pect s cor r es po nd t o  t w o di f f e r ent  w o rl ds p r e s ent i n g t w o di f f ere n views  of a  syste m .   In t h i s  sect i o n ,  hy bri d  a u t o m a t a   m odel  bel ongi ng t o  t h e se con d  cl ass i s  descri be d. T h e con s t r uct i o n   of t h e di a g n o si s i s  based o n  t h i s  no rm al  operat i ng m odel  whi c h rep r ese n t s  t h e sy st em  i n  norm a l  sit u at i ons,   whe n   no  faul t  i s  prese n t .  Pr oced u r es base d o n  t h i s  m odel  are a pri o ri  abl e  onl y  t o   det ect  faul t s Whe n   i n f o rm at i on i s   pr o v i d e d  ab out  whi c part  o f  t h e no rm al op erat i on m odel  i s  un veri fi e d  in presence  of  faults,  i s ol at i on (l ocat i o n )  of  t h e faul t y   com ponent  becom e p o ssi bl e.     2. 1. Hy bri d  A u to ma ta   Hyb r i d  au t o mata [9 ], [10 ]  can  b e  seen  as an  ex tension  of ti m e d  au to m a ta with  m o re g e n e ral   dy nam i cs. A cl ock  x  is a con tin uou v a riab le with  tim d e ri v a tiv e equal to  1 ,  t h at is  1 x   . I n  a hy bri d   aut o m a t on, t h e  cont i n uo us va ri abl e x  can evol ve accordi n g to som e   m o re  gene ral diffe rential equations, for  ex am p l e .  Th is  allo ws  h ybrid   au to m a ta to  cap ture no o n l y  th e ev o l u tio o f  tim e b u t  also  th ev o l u tio n   of a  wid e   rang o f   p h y sical en tities. Th d i scret e  d y n a m i cs o f  h ybrid  au to m a ta can  also   b e   m o re  com p l e an d d e scri be d wi t h  m o re  gene ral   c onst r ai nt s. I n   t h f o l l o wi n g , we prese n t   c o m m onl y   used   ver s i o of  hy b r i d   aut o m a t a . Di ffere nt  f o rm s of c onst r ai nt resu l t  i n  di f f ere n t  vari a n t s   of t h i s  m odel .  A   hy b r i d   au to m a to n    co n s ists of a  fin i te set Q of  d i screte states and  a set  o f   n  c o nt i n u o u vari a b l e s ev ol vi ng  i n  a   continuous state space  . In eac discrete state  the e v olution of the c onti n uous  va riables a r e   go ve rne d   by  a  di ffe re nt i a l  eq uat i on: . T h e i n vari a n t  o f  a  di s c ret e  st at  i s  d e fi ne d as  a s u b s et   of  . The  co n d i t i ons  fo r s w i t c h i ng  bet w ee di scret e  st at es ar e speci fi e d  by   a set  of  g u ar ds  suc h  t h at  f o r   each  discrete transition .   A state (q,  )  of    can c h ange i n  two  ways as follows:  1 )   b y  a co n tinu o u s  evo l u tion, th e co n tinuou s state    evolves accordi ng t o  the  dynam i c s  fq while   th e d i screte state q   rem a in s con s tan t ;   2) by  a di scret e  evol ut i o n,  x  satisfies th e g u a rd  of an  ou tgo i n g  tran sitio n, th e syste m  ch an g e s d i screte  state b y  tak i ng   th is transitio n .   Let u s  con s id er th h ybrid  au t o m a ta g i v e n  i n    Figure  1 This a u tom a ta has t h ree  discrete states  and .   The co nt i n uo us e vol ut i on i n  t h e st at es i s  repre s ent e resp ect i v el y  by (( ) ) x fx t   A n X ļƒ  qQ ļƒŽ (( ) ) q xf xt   q q  X q T x A x 12 , qq 3 q 11 2 2 3 3 () , ( ) a n d ( ) x fx x f x x f x     Evaluation Warning : The document was created with Spire.PDF for Python.
                         I S SN 2 088 -87 08  IJECE   Vol. 5, No. 6, D ecem ber  2015 :   1396 ā€“  1406  1 398 The i nva riant i n  the  state  and a re re spectivel y ,    and .   Th e i n itial stat e of th is  system   is represen ted   b y  an inp u t  arc in th o r i g in state            Fi gu re  1.  Hy br i d  A u t o m a t a       Th rou gh th u s e of  t h h ybr id au t o m a ta o n e   m u st  create a norm al ope ration m odel  whic h re prese n ts   th e syste m   in  n o rm al s itu ati o n s , wh en   n o   fau lt is p r esent. Th is  m o d e l is o b t ain e d  fro m   id en tificatio n   o f   diffe re nt possi ble states  of  the system , the evol ution e quati ons in  each sta t e and the  nece ssary c o nditions for  t h e t r a n si t i ons   fr om  one st at t o  an ot her.  T h i s  dy nam i m o del  i s   nei t h er   m o re no r l e ss   a co py   of  t h p r o g ram   cont rol - c o m m and  sy st em  t o  di ag no se, t o   whi c h i s  a d de d t i m e i n form at i on,  suc h  as  t h du rat i o of t h di ffe re nt  st ep  of  ope rat i o n a nd  dat e  o f  occ u r r ence e v e n t s . Pr oced u r es b a sed o n  t h i s  m odel  are a  pri o ri  abl e   onl y  t o  det ect  faul t s When  i n fo rm ati on i s  pr ovi ded a b out  w h i c par t  of t h e no rm al  operat i o m odel  i s   un va ri ed i n   pre s ence  of  fa ul t s ,  i s ol at i o n  (l oca t i on)  o f  t h e  fa u l t y  co m pon ent   becom e s p o ssi bl e.         Fi gu re  2.  R e p r esent a t i o n  o f  t h dy nam i m ode  l       B o t h  co nt i n uo us an d di scret e  vari abl e s are  necessary  t o  descri be t h e b e havi or  of a h y b ri d sy st em Th e tim e ev olu tio n   of th syste m  resu lts in  a  su ccessio n   of m o d e s. Each m o d e    is   ch aracterized   b y  a  m o d a lity  o f  th e d i screte state, a   set  o f  equ a lity c o n s t r ain t s (equ atio ns o f  state) and  d e fi n itio n  of do m a in   ad m i ssi b ility  (written  b y   in eq u a lity  co n s t r ain t s: invarian t). A d i screte tran sition    o f  a   m ode t o  anot h e r m ode occu r s  whe n  cert a i n   l ogi cal  co nditions a r e satisfied. T h ese cha nges  m a y be caused by   di scret e  eve n t s  t h at  are ge ner a t e d by  di sc ret e  act uat o rs  or  sens ors .  The a c t i v i t y  tim e of an associ at e d  m ode   state is specific to a give n s ituation. T h ere f ore we sa y t h at th e system is in  n o rm al  m o d e , if th e m o d e   activation time is noted i n   the in terval , if the activation tim e  ex ceeds  term inal   the  syste m  is   co nsid ered   fau lty. It is rep r esen ted   b y     12 , qq 3 q 1 () in v q 2 () in v q 3 () in v q 1 q 1 ,( ) in it q 12 (M , ... ) n M M n T m I max i M T Evaluation Warning : The document was created with Spire.PDF for Python.
I J ECE   I S SN 208 8-8 7 0 8        Using  H y b r i d  Au toma ta  f o Diag no sis  o f   Hyb r id Dyna mica l S y stems (Lo t fi Mh amd i 1 399 Figure  3 .  F o r e ach m ode,  we  defi ne t w o t i m e val u e s , as  f o l l ows:   1)  The  m i nim u m   t i m e  necessa ry  f o r  co rrect  e x ecut i o o f  m ode  , n o t e d  by     2 )  Th e m a x i mu m  ti me to lerated   for th e ex ecu tio n of m o d e  , no ted   b y     Th us we  defi n e  t h e no rm al  operat i n g i n t e r v al s not ed  =  and t h at  t h e fa u l t y   m o d e   not e d :  .             Fi gu re  3.  Act i v at i on t i m e and  m ode of  o p erat i o n       Th e u tility u s ed  for d y n a m i c   m o d e ls is  th e h ybrid  au t o m a ta, we sh all also  see th at th is to o l  h a s th di sad v a n t a ge  o f  i n c r easi n g t h e si ze o f  t h m odel s  cons i d erab ly  with  the co m p lex ity o f  th e system  stu d i ed   (p articu l arly ind u s t r ial syste m s). Th us, we mu st first an swe r  the question " I s what  all m odeled traject orie s are  actually achievable in the syste m   Ā» An swer that question bac k  to the  reach a b ility analysis of states in the   g r aph  wh ich lead s to red u c ed m o d e l o f   h ybrid  au t o m a ta ca lled  attain ab le  au to m a to n  wh i c h   we m o d e led  th p o s sib l e ev o l u tio n s  of th e syste m  fo r a  g i v e n   in itial co nd itio n .       3.   OBJECTI V E OF  O U R DIA G NO SIS AP P R O A C H   BA S E O N  HYB R ID   M O DEL   In t h i s   pape we base  ou rsel ves o n  hy bri d  m odel s , whi c h  pr op ose t h e c o m p i l a t i on of  a di ag nose r   from  a hybrid autom a ta  m o del of th e system . In Figure  4, we illustra te the global schem a  of diagnos e r   co nstru c tion .         Fi gu re  4.  Et ape  o f  c onst r uct i o Di ag no ser   i M mi n i M T i M ma x i M T m I mi n m a x , ii MM TT     ma x , i M T    Evaluation Warning : The document was created with Spire.PDF for Python.
                         I S SN 2 088 -87 08  IJECE   Vol. 5, No. 6, D ecem ber  2015 :   1396 ā€“  1406  1 400 Acco r d i n g t o  t h e m odel  of t h e sy st em  t o  di agn o se, t h e e v ent  be ha vi o r s ,  t e m poral  an d  di ffe rent i a equat i o ns  o f  t h pr ocess a r e  i d ent i f i e d. T h us, t h e m odel  of t h e sy st em   i s  sup p o se d t o  be "c om pl et e" i n  t h e   sen s e it  h a p r esen t th e no rm al an d failing   b e h a v i or  o f  the p r o cess b y  t h e too l  FMEA (Failure Modes and  Effects Analysis).  An d t h ere f ore  we wa nt  t o  bui l d  t h e di ag nosi s  of t h i s  sy st em , i n  t h e form   of a hy b r i d  m odel .  The r o l e   o f  th d i agno sis is to  in fer t h e ex isten ce no n- ob serv ab le fau lts b a sed   o n   ob serv ab le ev en ts and  th e ti m e   elapsed bet w ee n the s e e v ents.  A system is sai d  to  b e   fau lty wh en  th e actual b e h a vi or i s   n o t  co nsi s t e nt  w i t h  one  nom i n al  t r aject ory .   Eve n  i f   fa ul t s   are rel a t e d t o   phy si cal  c o m pone nt (act uat o rs , se ns ors ,  a n d  sy st em  com ponent s)  t h e y   m a y  be  classi fi ed  with  respect t o  their effects:  fau lts  may eith er affect th e con tinu o u s -tim e ev o l u tio n in  a  g i v e n   m o d e   (so-called  con tin uo us fau lts)  o r  m a y affect th d i screte trajecto r y (so-called   d i screte  fau l ts) [11 ] .     3. 1. Contin uous  F a ults   C ont i n u ous  fa u l t s  are rel a t e d  t o  a  gi ve n m ode . T h ey  m a y  be of  t w o t y pes:   1)   Fau lt th at co rru p t s th e equ a lity co nstrain t s.    2)   Fau lt th at co rru p t s th e i n equ a lity co n s train t s.    3.2. Discrete   F a ults   These  fa ul t s  pe rt ur b t h di scre t e  evol ut i o n. T h ree  ki nds  o f   f a ul t s  m a y  be consi d ere d :   1)   The sy st em  i s   m ovi ng  fr om  one m ode i  to an ot he r o n e  whi c h i s  n o t  refe rre d as a pos si bl e   success o r if the   syste m  works norm ally, th at is  to say a s u cces s o r whic h does not belo ng to the pre d iction  gra p of l e vel   1 ass o ci at ed  wi t h  m ode i .   2)   The system  is  m oving  from one m ode i to a  s u ccess o that belong to the pre d iction  gra ph  asso ciated   with m o d e  i bu t th e tran sition  cond itio n  is no v e ri fi ed.  3)   The sy st em  i s   st ay i ng i n  a  m ode e v en t h o u gh a sp o n t a ne ous  or f o rced  swi t c hi n g  co n d i t i on i s   validated.  To b e t t e r u nde rst a n d  t h di ffe rent   phase s o f   di ag no si s (c on st ruct i o n o f  t h e  dy nam i m odel ,  det ect i o n   p h a se, l o catio n) we will  d e scrib e  in  m o re  d e t a il th ese id eas th rou g h  a h y d r au lic syste m  with  two  tan k s.      4.   APPLI CATI O N: TWO  T A NKS  SYSTEM  4.1. Description  of the Sys t e m   The t w o t a nks   sy st em  depi ct ed i n   Fi g u re  5 i s  co nsi d e r ed t o  i l l u st rat e  t h di agn o si s m e t h o dol ogy .  The   syste m  co n s ists of:  1)   2 t a n k s R 1  a n d  R 2 w hose  sec t i ons a r e e qual  S1 =  S 2  =  0. 0 1 5 4  m 2 . These  t a nks a r e l i n ke by  a   l o we r pi pe  C 2   an d an upp er pip e  C 3 . T h fl ow  thro ugh   p i p e  C 2   can  b e   i n terru p t ed  with   a switch i ng  v a lve  V 2 2)   On e pu m p  P that d e liv ers a liqu i d   fl ow  Q p  t h at fall in to  tan k   R1 3)   s w i t c hi n g  val v es V 1 , V 2 , V 3  and  V 4  allo w to  co n t ro l t h fl ows  Q 1 , Q 2 , Q 3  and  Q 4 4)   Tw o l e vel  se ns ors  S h1et   Sh ( r espect i v el y  t o   m easu r e th e lev e l in   bo th  tank s R 1  an d R2),  5)   An  o v e rflo w   s e ns or  D h 1  in t h reser v oir R 1 .       Fi gu re 5.   Tw o t a nks   sy st em       Th e pu m p  is co n t ro lled  i n  on– off-co n t ro l so as to   m a in tain    in  a fix e d  i n terv al. Th e log i c o f  th pum p i s  as  f o l l o ws:   1)   Th pu m p  is in itiall y tu rn ed   on 2 h Evaluation Warning : The document was created with Spire.PDF for Python.
I J ECE   I S SN 208 8-8 7 0 8        Using  H y b r i d  Au toma ta  f o Diag no sis  o f   Hyb r id Dyna mica l S y stems (Lo t fi Mh amd i 1 401 2)   She st o ppe w h en   3)   It is switch e d on   wh en     The pum p  flow is  m easured, the state of the pum p ( on  or  of f) i s  not  co ns i d ere d  t h erea ft er.  When t h e   pum p i s  st o p p e d , ze r o  fl ow  ( Q p  = 0) wh en oper a tin g Q p  = Q 0  = 0.001  m 3 /s.   The sy st em   m a y  be  m odel e d by  consi d eri n g  5 di scret e  st at es. The  fi r s t  on e i s  t h e st at e of  pi pe C 3  th at  may  tak e  th e t w o  m o d a lities:  E m p t y (E) o r  Fu ll (F). Th e 4  o t h e r d i screte states are th e states o f  v a lv e V 1 val v e V 2 , V 3  an d v a lv e   V 4  that  m a y tak e  the m o d a lities Op en ed   (O)  or  Clo s ed   (C).  As a co n s equ e nce 32  m o d e s allo ws  to  represen t  all p o ssib l no rmal situ ati o n s . Each m o d e  is ch aracterized  b y  a m o d a lity o f  th discrete state vector (V 3 , V 1 , V 2 , V 3 , a nd  V 4 ), a set o f  con t in uo us state eq u a tio ns and  ineq u a lity co n s t r ain t s.  The f o ur  val v e s  V 1 , V 2 , V 3  and V 4  a r e c ont r o l l e d m a nual l y . They  m a y  be ope ne d o r  cl o s ed by  t h e o p er at or at   any  t i m e . W e   con s i d er t h at  t h e sy st em  i s  used i n  a  gi ve n expl oi t a t i on m ode i n  w h i c V 1  and V 2  are always   ope ne d. O n l y  pi pe C 3  and  va l v e V 4  ar e op erated . Th e two  co rr esp ond ing  actio n s  (o p e n  an d  clo s e)  cor r e sp ond  in  th e fo llo wi ng  to  ev en ts e 1  and e 2 . T h e e v ents e 1  and e 2   (res p ect i v el y  t h e t i m e  of ope ni n g  an d cl osi ng t h val v e V 4 )  are  c ont rol l e d;  e 1  o c cu rs at ti m e  t = 24 0 s,  wh ile e 2  o c cu rs at tim t = 38 0 s.  The  fl ow s Q 1 , Q 2 , Q 3  an d Q 4  are gi ve n by :   1)      2)      3)      4)      W i t h  ; o ù :     an d    is grav ity.  Q 1  an d Q 4 : th o u t flows  resp ectiv ely R1  and   R2  tank s.  Q 2  an d Q 3 :  t h e   out fl o w fr om   t h e rese r voi r  R 1  t o  R 2  t h r o ug pi pes  C 2  and  C 3 , res p ectivel y.    The  hybri d  aut o m a ton that re prese n ts the sy stem  unde r norm a l conditions  in  this exploit a tion m ode  is p a rt  of th e co m p lete au to mato n  and  is  g i ven   b y     Figure  6         Fi gu re  6.  Hy br i d  aut o m a t a :  norm a l  beha vi o r       From  dy nam i c m odel  const r u c t i on  we  go t o  ex pl ai n t h di ffe rent   ph ases  of t h di ag no st i c  wi t h  t o ol   Matlab  / Sim u l i n k / Stateflow.    4. 2.  C o ns truct i on  of  the  Di a g n o ser w i th  St ate f l o w   C o n t r o l   o f   H y b r i d   P o w e r   P l a n t   s t a t e f l o w   i s   a    t o o l   i n t e g r a t e d   i n   t h e  M A T L A B   e n v i r o n m e n t     and   use d   fo r   t h e  devel opm ent   and  t h e  s i m u l a t i on  of   com p l e x  react i v e sy st em s.  It  uses a va ri ant   of t h fin ite state  m a ch in e.   Sp ecifically, it u s es th e h y b r i d  St ate charts  form alis m .   It provi des a bloc k that  can be   in clu d e d  i n  a  Si m u lin k  m o del.  Ad d ition a lly, it en ab les th e rep r esen t a tio n   o f   h i erarch y,  p a rallelism  an d   2 0.2 hm  2 0. 1 hm ļ‚£ 11 Qh   21 2 1 2 (h ) Qs i g n h h h    31 1 (h 0 . 5 ) 0 . 5 Qs i g n h    42 Qh   2 A g   52 3. 6 1 0 A m   2 9.81 / gm s  Evaluation Warning : The document was created with Spire.PDF for Python.
                         I S SN 2 088 -87 08  IJECE   Vol. 5, No. 6, D ecem ber  2015 :   1396 ā€“  1406  1 402 hi st ory .  Hi e r ar chy  e n abl e s  t h or ga ni zat i o of  com p l e x  sy st em s by  defi ni n g  a  pa rent / o ffs p r i n ob ject   structure.  4. 2. 1. N o rm al  B e ha vi or   Sim u lation  of t h e T W O T A NKS  SYSTEM  w ith State  flow is de picted i n     Figure  7 1)   M ode  1:  y o u  m u st  c o m p l e t e  reserv oi r  R 1  t o  t h e l e vel     h attain ed  0 . 5 .   2)   M ode 2:  t h e l e vel   h reac he d 0. 5, t h e t w o pi pes C 2  and C 3  are open, you  m u st com p lete   reservoir  R2  to th e lev e   h 2    attain ed  0 . 5 .   3)   Mo d e 3 :   Wh ere th e two  lev e ls  tan k s  ex ceed  li mits, th e v a lv V 4  is  o p e n e d  to th e tim e e 1 4)   Mo d e  4 :   we m u st em p t y th e two tank s t o  level   h 1 <0 .5         Fi gu re  7.  M o d e l i ng  of  t h p r o cess wi t h  st at fl o w       Evaluation Warning : The document was created with Spire.PDF for Python.
I J ECE   I S SN 208 8-8 7 0 8        Using  H y b r i d  Au toma ta  f o Diag no sis  o f   Hyb r id Dyna mica l S y stems (Lo t fi Mh amd i 1 403     Fi gu re  8.  N o r m al  behavi or   The c o n s t r u c t i o n  o f  t h e  di a g nosi s  i s  base on  t h e t e m por al  kn o w l e d g of t h pr ocess;  we  nee d  t o   kn o w  t h pr oc ess d u rat i o n s u ch as t h ope ni ng t i m e of t h e val v es  or t h e t i m e of sens o r  s t at us cha nge . F i gu re  8  illu strates t h e no m i n a l b e h a v i or  o f  t h e instru m e n t atio n   p r o cess  of an   o p e ratin g cycle.  Fro m  figu re abo v e , th e tran sitio n  tim es are de fine d for eac h phase  of the  norm al proce ss.      Tabl e 1.   I d ent i fi cat i on of   t e m p o r al  pr ocess   Act i ons   Tim e  in sec  Int erval of  t i m e     Opening the pu m p  Qp.      Closing the pum Qp.         20       [ 0  , 2 0 ]     Opening the valve V 4     Closing the valve  V     240     380       [24 0  ,  380]   Activating the sensor  Sh1    Deactivating the se nsor Sh1  7.   60       [ 7 .7  , 6 0 ]     Activating the sensor  Sh2      Deactivating the se nsor Sh2    20       180       [20 ,  180]       4. 2. 2. C o nsi d e red  F a i l u res  In   o r d e r t o  illustrate th e po ssi b l e fau lt cases stated  at secti o n   3 . 1  an d   3 . 2 (con tinu o u s  an d   d i screte  fau lts), we  co nsid er  t h e fo llowing  2  p a rticu l ar  situ ation s :   1)   Th fau lts t h at  p e rt u r b  th e state equ a tio ns (con tin uou fau lts):  a)   Fault   of sensor Sh1 that m easures  h 1 b)   Faul t  o f  se ns or  Sh 2 t h at  m easures  h 2 2)   The faul t s   t h at  pert ur t h e   pa s s age bet w ee n d i ffere nt   m odes (di s c r et fa ul t s ):   a)   Eve n t e 1  i s  co nt r o l l e d.  It  occ u rs t i m e t  = 240s . I f  t h i s  e v ent  has  n o  ef f ect  on t h e di sc ret e   state evolution (valve  V 4  stays b l o c k e d   o p en ed), th syste m  will s t ay  in  m o d e  2  (Th e   passa ge m ode  2 t o  m ode 3  i s   di sabl e d ),   Evaluation Warning : The document was created with Spire.PDF for Python.
                         I S SN 2 088 -87 08  IJECE   Vol. 5, No. 6, D ecem ber  2015 :   1396 ā€“  1406  1 404 b)   Eve n t e 2  i s  cont rol l e d. It  occ u rs at  t i m e  t = 3 80s . If t h i s  eve n t  has n o  effec t  on t h e di scret e   state evolution (valve  V 4  stays b l o c k e d  cl o s ed ), t h e syste m  will s t ay  in  m o d e  4  (Th e   passa ge m ode  4 t o  m ode 1  i s   di sabl e d ),   c)   In  fact, if  p i p e  P3  is en tirely clo g g e d, th dyn amics o f  th e state v a riab les will co n tin u e   to   co rresp ond  to th e con tin uou state eq u a tion s  of m o d e   1  ev en  if th e lev e h 1  bec o m e s l a rg er   t h an  0, 5m  (t he  sy st em  rest  i n   m ode 1) .     4. 2. 3. Fa ul t Di ag nosi s   Usi n g Sta t e f l o w   In  order to  det ect and locate  a fault on the s t udied   process ,  a syste m  for i n ject i n g ra n d o m  defect s on  the process i n s t rum e ntation was created.          Fi gu re 9.   I n ject i on bl oc k ra nd om   faul t s     5. RES U LT  A PPLIC ATIO N   In  th is  work   we are in terested  on ly in  d e tecti ng the o v e rfl ow  of the  rese rv oir R2  (gi v e n  by  h 2 ) an d   we c onsi d er  o n faul t s   rel a t e d t o  t h rese rv oi r:  S h 2_ st u c k cl o s e ( 2 Sh F : Does no t detect th e lower lev e l   (al w ay set   t o  1) ). Thi s  be hav i or  i s  re prese n t e d by   t h e fa ul t y   m odel   ( F i g ur 1 0 ) .           Fi gu re  1 0 . M o del  o f  t h e fa ul t y  sy st em       Our obj ectiv e i s  to  d e tect and id en tify th e fau lts o c cu rring  in  th e pro c ess.  Th at lead s to   determin in th e way of lo catin g  a fau lt, an d  t o  d e term in in g  th e tim of i t s  occur r e n ce . Fi g u re  1 1  des c ri bes t h va ri at i o n s   o f  th e lev e l in  t h e two  Reservo i rs.    Evaluation Warning : The document was created with Spire.PDF for Python.
I J ECE   I S SN 208 8-8 7 0 8        Using  H y b r i d  Au toma ta  f o Diag no sis  o f   Hyb r id Dyna mica l S y stems (Lo t fi Mh amd i 1 405       Figu re 1 1 . Dia g n o sis fo r fa ult  Sh 2 _ ST UCK  CLOSE   To  b e tter  under s tand  th e p r in cip l e o f  th e d i ag no ser ,  Fig u r e  11  allo ws u s  to  co m p ar e n o r m al   ope rat i o n ( p a r t  ab ove of  t h pr ocess  wi t h  a  st at e of  fa ul t y  ope rat i o n ( p a r t  bel o w ) .   In  t h figu re belo w, d e sp ite t h e lev e sen s or d e tects  lower  reservo i r R 2  lev e l th at is t o  say, p a ss to   the zero  state (gree n  si gnal), i t  rem a ins in st ate 1  (bl u e si gnal). This  m o ment repr ese n ts the  occ u rrence of a   failure.  Since t h e sensor Sh2  rem a ins in state 1 ( h 2 > 0. 2 ) ;  t h ere f o r e t h e r i s  di st ur ban ce on t h e ev ol ut i on  of   t h e co nt i n u ous   part  i s   d u e t o  t h passa ge m ode  3 t o  m ode 4  i s  cancel e d .       5.   CO NCL USI O N   In t h i s  pa pe r we st u d i e d t h e  faul t - di a g n o si s pr obl em  for hy b r i d  sy st em s.  W e  use d  t h fo rm ali s m  of  h ybrid  au to m a t a  for m o d e ling h ybrid   syste m s with   fau lts an d to   d e fi n e  t h e no tio ns of  d i ag no sab ility an d  tim e   ab stract d i agno sab ility. W e  fo cu sed  ou r at ten tio n  on  ti me-ab s t r act d i agn o s ab ility an d we d e fi ned a  Faul t   Diagn o sis on   h ybrid  au to m a ta with  fau lts  for  T W O  T A NK S S Y STE M . H o we ve r,  ou r a p p r oach   can  be  i n t e grat e d  wi t h   t h e pr o g n o si s.  Thi s   i s   t o  be  ca pabl e b o t h  o f  r e sp on di n g   t o   t h e occu rre nce  of   fa ul t ,  b u t   a l so  to  b e  ab le to   an ticip ate.      ACKNOWLE DGE M ENTS  The a u t h ors  w oul d l i k e t o  t h ank t h e com m e nt s p r o v i d e d   by  t h e an o n y m ous revi ewe r s and e d i t o r ,   whi c hel p  t h e  aut h o r s i m pro v e t h i s  pa pe r s i gni fi ca nt l y . We  wo ul d  al s o  ac kn o w l e d g e  t h hel p  f r om  Zi ne Si m e u - Ab azi,  In stitu t Nation a l Po lytec h n i que  d e  Grenob le, INPG Fran ce.      REFERE NC ES   [1]   R. Alur, C .  Cou r coubetis, N. H a lbwachs,   T. A .  Henzinger ,  P.  H. Ho, X. Nico llin, A. Olivero ,   J. Sifakis,  and  S.   Yovine, " T he Algorithmic Anal ysis of H y br id S y stems",  T h eor e ti cal Com puter Science 138 , pp . 3 –34, 1995 [2]   O. Maler ,  Z. M a nna,  and A. Pn ueli , "From  Timed to H y b r id  S y ste m sā€ ,  In J.  W.  de  Ba kker ,  C.  Huizing,W. P.  d e   Roever, and  G.  Rozenberg editors, Real-Time:  Theo r y   in Practice, 600, Springer-Verlag ,  pp . 44 7–484, 1991 [3]   Saeed Ghasem i, Leili Moham m a d Khanli,  Mina  Zolfi, Ghad er Tahm asebpour,  "Modeling and Sim u lation of NFC  Logical  Lay e Peer-to-Peer  Mode using CPN and  TA ", In ternational  Jour nal  of  Electrical and Computer  Engineering ( I JECE) ,  Vol. 4, No. 2 ,  pp . 162-16 8, 2014 [4]   Branick y  M.S. "Studies in h y br id s y stem s: Modeling ,   Analy s is and Control",  PhD  the s is,  MI T,  Ma ssa c huse tts,   USA, 1995.  Evaluation Warning : The document was created with Spire.PDF for Python.