Indonesian  Journal  of  Electrical  Engineer ing  and  Computer  Science   V o l. 10 , No . 3, Jun e   20 18 , pp . 90 5 ~ 91 ISSN: 2502-4752,  DOI: 10. 11591/ij eecs.v10 .i3.pp905-916          9 05     Jo urn a l  h o me pa ge : http://iaescore.c om/jo urnals/index.php/ijeecs  Algorith to  Convert  Signal  In terpreted   Petri  Net  models  to  Program mable  L ogi Con troller  Ladder  Logic  Diagram  Models       Z .   Aspa r Nasir  Sha i kh-Husin,  M.  Kha lil-Ha ni   Facult of  Ele c tr ica l  Eng i ne ering ,  Universi ti  Tekn ologi Ma la ysia Mala y s ia         Article  Info    A BSTRAC T Article histo r y:  Received  Ja n 20, 2018  Rev ised   Mar  17 , 20 18  Accepted  Mar 31, 2018      Signal Interpr e ted Petri Nets (SIPN)   modeling has been proposed as an   alt e rnat ive to  L a dder Log i c Di agra m (LLD)  modeling for programming   complex programmable logic controllers  (PLCs) due to its high level o f   abstraction  and  function a lities .  This  pap e r p roposes an alg orithm to  efficiently   convert existing SIPN models  to their LLD models equivalences.  In order  to au to mate and  speed   up the  conversio n process, matrix calculation   approach is used. A complex SIPN  m odel was used to show t hat existing  conversion tech nique must be expanded in  order to cater for a more complex   SIPN mode ls.   K eyw ords :   Co nv ersion  Ladder Logic Diagram  Petri Net   Pro g r am m a bl e Lo gi c C o nt r o l l e r   Copyright ©  201 8 Institut e  o f   Ad vanced  Engin eer ing and S c i e nce.  All rights re se rve d Co rresp ond ing  Autho r Z. Aspa r,  Facu lty of Electri cal Engineering,  Un i v ersiti Tekn o l o g i  Malaysia,  8 131 0 Joho r B a h r u ,  Joho r, M a laysia.      1.   INTRODUCTION  Process c ont rol and aut o m a tion are  bec o m i ng inc r easing ly co m p lex  due to  th e in creases in  t h com p l e xi t y  of  pr o duct  s p eci fi cat i on,  sh o r t e desi g n  cy cles,  and s h orter  product  life cycles. T o  s p ee up  LL pr ocessi ng , a new a r chi t ect u r e was p r op os ed i n  [ 2 ] . Thes m o re dem a ndi n g  sy st em s requi rem e nt s resul t  i n   t h e need  fo r t h e con v ersi on  o f  LLD m odel s  t o  hi gh l e vel   of a b st ract i o n m odel s . A hi g h  l e vel  of a b st ract i o n   m odel i ng pa ra di gm  such as  Pet ri  Net  (P N)  [6]  o r Si g n al  Int e r p ret e d Pet ri  Net  (S IP N)  [1 6]  w oul d al l o w t h desi g n  speci fi c a t i on t o  be de f i ned cl ose r  t o  t h e pr od uct  or  sy st em  requi re m e nt  whi l e  reduci ng t h e d e t a i l s  of  th e lower lev e l  i m p le m en tatio n .   At th is ab st ractio n  lev e l, a  co -d esign  m e th odo log y  [4 ] an d [7 ] can b e  ap p lied   fo r P L C  i m pl em ent a t i on -  ei t h er  i n  s o ft war e , ha r d wa re,  o r a m i xt ure  of   bot h.  The  desi gn  t ra d e- of fs c a b e   easily calcu late d ,   op ti m i zed, a n d im ple m ente d.  The rest  of t h e  paper i s  or ga ni zed as fol l o w s:  Sect i on 2  revi e w s fu n d a m ent a l s  of LLD an d SIP N .   Related  w o r k s o n  PN , LLD  and  PN- to-LLD  conv er si o n s  ar e do ne in  Sectio n  3. Sev e r a l co nv er si on  alg o r ith m s  h a v e  b e en  pr oposed  in  [1 ], [ 3 ] ,  [ 1 0 ] , [1 1 ] , [1 4 ]-[1 6 ]  to  con v e r t PN  to  LLD .  Th e an al ysis o f   streng th s and  limita tio n s  are  presen ted  in   Sectio n   3 . 2 .  Section  4 pr opo ses a  n o v e l algo r ithm  f o r  SI PN- to - LLD  con v e r si o n . C a se st udi es  an resul t s   fo r t h pr o pose d  c o nv ersi o n s a r e di s c usse d a nd a n al y zed i n  Sect i on  5 .   C oncl u si o n  i s  i n  Sect i o 6.       2.   LADDER  LOGIC  AND  PE TRI  NET:  REVIEW  B o t h  PN   an d LLD we re bo r n   i n  19 6 0 ’s   b u t   fo r di f f ere n t  reaso n s P N  w a i n vent e d  by   C a rl  Adam   Petri to  stud y asyn chrono us  n a ture in  co mm u n i catio n .  Mean wh ile, LLD was i n v e n t ed  du e to  t h e need s t o   m i nim i ze ret r ai ni ng t i m e by   m i m i cki ng the  existing electrom echanical re lays wh en  PLC was in troduced . As  PN gro w with  m o re fun c tion a lity in clu d i ng  as an  an al ysis to o l  as p r opo sed  in  [1 8 ] , [2 0 ] , an d   [20 ] LLDs  Evaluation Warning : The document was created with Spire.PDF for Python.
                        I S SN 2 502 -47 52  I ndo n e sian  J Elec Eng  & Com p  Sci, V o l. 10 No 3 ,  Jun e   2 018  :   90 5 – 91 90 6 Figu re  1.  LL fo r a  sim p le safety  circuit   evol ves i nt o a  very  i m port a nt  t ool  i n PLC  i m pl em ent a t i on,  researc h  on both areas st arted  to  m erg e to geth er at  th end  of  1 990 s .     2. 1.   L a dder L ogi Di a g r a m   An LLD m o d e ls th e actu a l com b in atio n  of relay co n t act s.  A relay co n t act o r  a step  i n  LLD is eith er  norm ally closed (NC) s u c h  as  alarm ,   or n or m al ly  ope n ( N O) s uc h as m a in i n Fi gu re  1.  They  are c o nt r ol l e d by   l ogi cal  i n put and  st at e vari abl e s w h ich   are rep r esen ted b y  lab e ls.  Wh en  an  i n pu t trigg e rs t h e step , the  co rresp ond ing  relay state ch an g e s to  th o p p o s ite state, i.e., th e NC step   is tu rn ed  ON  wh ile th NO  step  is  tu rn ed OFF. Th e co m b in atio n   o f  NC and   NO  will affect  t h e Ou tpu t  Co il  wh ich  co rresp o n d s  to a relay state.  I n an y LLD su ch as i n  Fi gu r e  1, th e rung s ar e c o nnect ing t h powe r source  re pres ented  by t h e   vert i cal  ba on   t h e l e ft , a n d  t h e gr o u n d   re pre s ent e by  t h e  v e rt i cal  bar  o n  t h e ri ght .  Eac h   ru n g  can  be  di vi de in to  two  p a rts: at th e en d   o f  t h e run g s on  th righ t are th o u tp u t s,  wh ile the rest on   the left are the step i n puts Th e co m b in atio n of  th e step in pu ts i n  a  r ung is also   kn own   as th n e two r k   in pu t. Th e co mb in ation   o f  all r ung  out puts in a L L D re prese n ts  a state. The state can change  i f  any  of t h ou t put  cha nge s d u e t o  cha nge s i n  any   of the step i n put. Thus, the  LLD state vari es depe nd ing on the ste p s com b ination. T h e step inputs  change   ei t h er c h an ges   di rect l y  fr om  ext e r n al  o r   phy s i cal  i nput s  o r   d u e t o  t h fee d b ack  fr om  t h e ot her  r u n g s  o u t p ut s.             Thi s  LL D i m pl em ent s  t h e sy n c hr o n o u s a ssi g n m e nt s of t h B ool ea n e quat i ons  as:     start = m ain • safe • alarm    st op  = em gcy  + p o we r +  pa u s ru n =  (start +  r u n )  •  st op        Furt her , t h ese  out put  c h a nges  can  be cl assi fi ed ei t h er  as sy nch r on o u s p r o cess, se que nt i a l  pr ocess,  o r   co m b in atio n   o f  bo th . So m e t i m es, th e d i fference is h a rd to   notice with ou t any syste m at ic an alysis.    2. 1.   Si g n al   In terprete d  Pe tr i  Net   Sig n a l In terpreted  Petri Nets (SIPN) is an  exten s ion  of Cond itio n /Ev en t Petri Nets wh ich  allo ws t h han d l i n of  bi nary  I/ O-si gn a l s i n  a wel l - de fi ne d way Th ey  are wel l  sui t ed t o   desi g n  c ont rol  al g o r i t h m s  for  d i screte ev en syste m s resu ltin g in  lan g u a g e s stand a rd ized   in  IEC  61 131 -3 SIPN are  d e fin e d  as a  10 -t u p e l   SIP N  = {P, T,  F, m 0 , I, O,  φ ω , v}  w h ere {P , T, F,   m 0 } i s  ordi n a ry Petri Net. To  b e co m e  SIPN, th extensi ons  are   as:     I    inpu t sign als, |I | >  0 ,     φ  – B ool ea fu nct i o n  i n   I at   T      –  o u t p ut  f u n c t i on c o m b i n es t h out put   ω   of all m a rked  pl aces    –  out put   si g n al s, | O|  >  0  a n  O =  Ø    ω  – a m a pping  associating e v e r t Place  with a n   out put     v     v a riab le d e fin itio n assign s a nu m e rical d a ta typ e     main safe   alarm   start  start  run   run  stop  Cyclic   scan  emgcy   pow er   paus stop  1 2 3 Evaluation Warning : The document was created with Spire.PDF for Python.
In d onesi a n  J  E l ec En g &  C o m p  Sci    ISS N :  2 5 0 2 - 47 52       Al gori t h m t o  C onve r t  Si gn al  I n t e rpret e d Pet r i  N e t  mo del s  t o  Pro gr am m abl  ( Z.  As par)   90 7 For  a m o re fo r m al  defi ni t i on  of S I P N , se e [ 1 ] , [ 5 ]  an d [ 1 8 ] . The dy nam i c B e havi or  of  an S I PN  i s   gi ve n by   t h e fi r i ng p roces s def i ned by  fo ur   r u l e s:   1.   A tra n sition is  enable d, if all  its pre - places a r e m arked  and firi ng ensures binary m arking  of all its post- places.  2.   A tran sitio n fires immed i atel y ,  if it is en ab led  an d its firi n g   co nd itio n is fu l f illed .   3.   All tran sition s   th at can   fire and  are  n o t  i n  co n f lict with o t h e r tran sitio n s  fire sim u ltan eo u s ly.  The firi ng process is iterate d until a stabl e   m a rk ing is reached  (i.e. until no transition ca n fire   an ym o r e).  Since firi n g  of a tran sition  is supp o s ed  to tak e   no  time, iterativ firin g  is in terpreted  as  sim u l t a neous , t o o . Fo r t h at  reaso n , n o  cha n g e s of i n put  si g n al m a y  occur du ri n g  t h e fi r i ng p r oc ess. A f t e a   new sta b le m a rki ng is reac hed, the  output signals  are c o m puted according to the m a rki ng a n d the  signal   algebra.          Fi gu re  2.  A n   S I PN  m odel  f o r   a r o b o t  arm       3.   RELATED  WORK  Al t h o u gh  PN  h a s m a ny  advan t ages o v er  LL D, P L C  w ith  LLD as th e d e si g n  en try is th m o st wid e ly  available in the world.  In  order to  m ake PN bei ng acce pted by existing  LLD users ,  it is im portant existing  PLC too ls an co mm o n  d e sign  techn iqu es can  still b e   reu s ed   3. 1.    P t o   L L D   Th er e ar m a n y  w o r k s r e lated  to  PN  to   LLD  conv er sio n  e.g .  [1 ],  [3],  [ 8 ]- [1 6 ] .   Wo rk  [9 ] is an   im port a nt  s u r v ey  on al l  rel a t e d w o r k on  LL D.  Aft e r s o m e   com p ari s on  o n  vari o u s t e c hni que s i n  [ 1 ] ,  [ 3 ] ,  [1 0] ,   [1 1] , [1 4] - [ 1 6 ] , t h e wo rk  do n e  i n  [1]  i s  t h best  fo r t h e j o b. Thei r m e t h o d  pr o v i d es sy s t em at i c  conve r s i o n i s ol at i on  fr om   i n p u t  an out p u t  net w o rks , a nd m a ke t h e L L pr og ram   m o re reada b l e  i n  o rde r t o  l o c a t e  t h e   fau lt in  LLDs wh ich  is a vital  issu e. Th ese co n s i d erati o n  is i m p o r tan t  to  redu ce  d e sign  ti m e  a n d  also  deb u ggi ng  an d  m a i n t e nance  t i m e. Thei r m e t hod  can  be  ext e nde f o SI PN,  Ti m e d and C o l o u r ed  P N .   The c o nve rsi o pr ocess i s  i m port a nt  d u t o  t w o i m port a nt  fact ors:  m a i n t a i n i n g LL D m odel i n g   para di gm  so t h at  use r s can  veri fy  t h ei w o r k  usi ng  k n o w n c onc ept , a nd  val i d at e t h e PN m odel  that  i t  i s   con s t ruct e d as  i t  was i n t e nde d  t o  be.  An ot h e r  im port a nt  t h i n g ab o u t  t h ei m e t hod i s  t h LLD  out c o m e   i s  very   neat and  systematic.   Evaluation Warning : The document was created with Spire.PDF for Python.
                        I S SN 2 502 -47 52  I ndo n e sian  J Elec Eng  & Com p  Sci, V o l. 10 No 3 ,  Jun e   2 018  :   90 5 – 91 90 8 3. 2.   Pre v i o us   PN  to  L L D   C o n v ersi o n   The m e t hod  pr op ose d  i n   [1]   was t o  i d e n t i f y  PN s u b n et s f o r f o u r  di ffe rent  pat t e rns a s  su m m a ri zed i n   Fi gu re 3 . The  pat t e rns ca n b e  di vi de d i n t o   f o u r  t y pes i n  t w pai r of set  and  reset  a ru ng . The set  r u l e  i s  t h condition to ac tivate a r ung while the reset  rule is  the c o ndition to  deactivate a rung. The  set rules c o nsist of  t w gene ral  st ruct ures  k n o w n as Ty pe  I a nd  Ty pe I I M eanw h i l e  t h e reset  r u l e s c onsi s t   of t w gene ral   str u ctur es kn ow as  Ty p e  I I I  an Typ e   IV . Th e d e ta il exp l an atio n of t h ru les can   b e  referred  in [1 ].          Fi gu re  3.  Ty pe s o f  SE T a n d  R E SET       4.   PROP OSE D   PN  TO   LLD  CO NVE RSI O N   In  or der t o  aut o m a t e  and spe e d u p  t h e c o n v e rsi o n p r oce ss,  bot h PN a nd  LLD s u b n et were a n al y zed  i n  t h ei r eq ui va l e nt  sub - I n ci de nce M a t r i ces ( s ub -IM ) an d s u b - B o ol ean e q uat i o n s  (s ub -B E) as sh o w n i n  t h e   sub - sect i o ns 4. 1.     4. 1.  I nciden t   Ma trices  Met hod   The  out put  c o i l  i n  a P L C  i s  de not e d   by  a pl ac e, P i s   renam e d as P j , t h k-t h   feedbac k  input step is P k ,   th e n - t h  step  inp u t s t as T 1 , T 2 , to  tn  as T n , t h e anal y s i s  on t h e su b- IM  an d  sub - B E  were  do ne o n  al l  t y pes of  p a ttern as illu strated  in Figu re 3 .  By referri n g  to   p r ev iou s  research er [1 ] ,  b a sically th ere are  fou r  types of  p a ttern s to b e  id en tified  in th e PN. Th ese in cu d e s Typ e  I,  Typ e  II , Typ e  III  an d Typ e  IV . Th e ru le is th e v a lue  ‘1’ is th ou tpu t  of th e tran sitio n ,  (P j ), wh i le th e v a lu e ‘-1 ’ is t h e inp u t  o f  t h e tran sitio n, (P k ). The sub - incidenc e m a tr ix and  sub-B oolean eq uation  for each Type is  disc usse d:  i.   The s u b-i n cide nce m a trix for  Type I:      ii.   The s u b-i n cide nce m a trix for  Type II:      iii.   The s u b-i n cide nce m a trix for  Type III:           P j      P 1     P 2     P 3  . ..  P k   T 1     1      -1    -1    - 1    ...  - 1   Th e sub - B o o lean  eq u a tion   fo r Typ e   I can   b e   written  as:   P j  = (P 1 .P 2 .P 3 . . ..  . P k ). T 1   The B ool ea n e quat i o n i s  ge ne ral i zed as :   i k j T P P .            (1        P 0      P    P 2    P 3  ...   P n   T 1   1     - 1           0   .. .   T 2   1       0    - 1       0   .. .   ...   T n   1       0      0      0   .. -1  Th e su b-Boo l ean  equ a tion  for Typ e  II can   b e  written   as:  P 0  = (P 1 .T 1 ) +  (P 2 .T 2 ) +  ( P 3 .T 3 ) +  ...  (P n .T n The B ool ea n e quat i o n i s  ge ne ral i zed as :   i k j T P P .       ( 2 )          P 0     P 1     P 2    P 3   . ..  P n   T 1   - 1               1   .. .    1    Th e sub - B o o l ean  equ atio n  for Typ e III can b e written  as:  P 0  = .. . +  P 0 .( P k  + T 1 The B ool ea n e quat i o n i s  ge ne ral i zed as :   ) .( i k j j T P P P      (3 )   Evaluation Warning : The document was created with Spire.PDF for Python.
In d onesi a n  J  E l ec En g &  C o m p  Sci    ISS N :  2 5 0 2 - 47 52       Al gori t h m t o  C onve r t  Si gn al  I n t e rpret e d Pet r i  N e t  mo del s  t o  Pro gr am m abl  ( Z.  As par)   90 9 iv .   th e su b-in cidence m a trix  fo r Typ e  IV:     Whe r e,               ,           The e q uations  are  analyzed  colum n  by c o l u m n  (k ) and   ro w b y  ro w (i ) starting   with   th e top   ro (i =0) . T h ese  ge neral   fo rm s equat i o n s  are  i m po rt ant  i n  t h e  s ubs eq ue nt  anal y s i s   4. 2.  Cus t om T r ansi ti on  f o L L D   Fo r PLC im p l e m en tatio n  u s i n g   LLD m o d e l ,  it is a co mmo n   practice to   h a v e  a sing le step  in pu t to  activate or  dea c tivate a rung.  In a  PN  m odel, the equivale nt ele m ent to activ ate or  deacti v ate an  output coil is  done by source  and sinks tra n sitions  respectively. By using  them there  is no  need to i n itialize any place with   a to k e n .  Bu t t h is will resu lt  in  th e PN  sub - n e t in co m p arab le wit h  an y  o f   p a ttern  ty p e s pro p o s ed   in  [1 ].  Pre v ious a n alysis shows  that  the Boolean  equation ca be a u tom a ted only if t h ere  are val u ‘1’  as the   o u t p u t/inp u t  and  v a l u e ‘-1’ as  in pu t/o u t p u t   resp ectiv ely in  a  row. Th e algorith m  d o e n o t   h a v e  a so l u tio n if in   th e row th ere i s  o n l y po sitiv n u m b e rs  o r   n e g a tiv e nu m b ers as sho w n  in  ex am p l e LLD Typ e  I in  Fi g u re 4  and   LLD  Typ II in  Fi g u re  7 .  The p attern d o  no t ex ist i n  th PN m o d el to be con v e rted due to a)   All p o s itiv o r  all n e g a tiv e co efficien ts wh i c h  ind i cate th e so urce tran sitio n   o r  sink  tran sitio n   o n l y .   Howev e r, th ese typ e o f  i n com p le te p a tte rn   always ex ist in PLC ap p licatio n s   b)   Mean wh ile, for Typ e  I or Ty p e   III  d o e s no ex ist co m p lete p a ir  o f  tran sitio c)   On th o t h e han d , Ty p e  II  o r  Typ e   IV do es  n o t   h a v e  co m p lete p a ir  o f  inpu t and   ou tpu t  tran sitio n.  In  ord er to  ob tain  th e correct resu lts, PN m o d els sh ou ld  h a v e th co m p lete p air o f  tran sition .   Meanwhile, to gene rate a Boolean equa t i on i f  t h ere are  onl y  val u e ‘1 ’ an d val u ‘0 ’,  or  val u e ‘ - 1  an val u e   ‘0’ is  by a ddi ng a tem pora r y (te m p) Place in  Petri Nets  a n it will becom e  wire i n  the  La dder Logic  Diagram .   Ty pe  Ty pe I P N  su bnet   prese n t e d  i n  [1]  co nsi s t s  of  one t r a n si t i on,  one  pl ace  and  one a r c a s  sho w n i n   Fi gu re  w h i c h  has  i n c o m p l e te pai r  o f  a r c.      In   ord e r to so lv e th e prob lem ,  th e in cid e nt  m a trices  i s  u s ed t o  p r ovi de  com p l e t e  pai r  of  i n put  a n out put arc s  by  addi ng a tem pora r y (Tem p) Place in Petri  Nets as illustra ted in Figure  5. The tem porary place  also acts as  the  curre nt activat ed  place denot e by a toke n.      The e qui val e nt  LLD  ru n g  by   usi n g t y pe I i s   sho w n i n  Fi gu r e  6 o n  t h e l e ft Si nce st ep Te m p  i s  al way s   ON, th e inp u t   is always connected  and  acts  as a wi re as sho w n  i n  Fi g u re  6   o n  th righ t.  Th is  p r o c ed ure will         P 0     P 1   P 2     P ...  P n   T 1   - 1               0   .. .   T 2   - 1               0   .. .   ...   T n   - 1               0   .. .   Th e sub-Boo l ean  equ ation  for Typ e IV can b e written  as:  P 0  = + P 0 .(P 1  + T 1 ). (P 2  + T 2 ). ( P 3  + T 3 ) .   ...  . ( P n  + T n The B ool ea n e quat i o n i s  ge ne ral i zed as :     i k j j T P P P .      (4 )     Fi gu re  4.  A  su bnet   wi t h   o n l y  one  o u t p ut  a rc     Fi gu re  5.  A  su bnet   wi t h  i n p u t  an out put  a rc   Evaluation Warning : The document was created with Spire.PDF for Python.
                        I S SN 2 502 -47 52  I ndo n e sian  J Elec Eng  & Com p  Sci, V o l. 10 No 3 ,  Jun e   2 018  :   90 5 – 91 91 0 en su re techn i qu e in  [1 ] can  always b e  u s ed  in  a so urce tran sitio n. Th e si milar p r o cedure is also  ap p lied  for  Type II  pattern where  the  temporary i n put st ep will  be repl aced with  a wire.              Fi gu re  6.  Fi nal  LLD  r u ng  f o r   PN s u bnet  Ty p e  I       Ty p e   I II  Typ e  III PN su bn et presen ted  in  [1 ] con s ists o f   one t r ans ition, one  plac e and  one arc  as shown i n   Fi gu re  w h i c h  has  i n c o m p l e te pai r  o f  a r c.                    Fig u re  7 .  A PN sub n et with a  sin k  transitio     In   ord e r to so l v e th is  prob lem ,  th e in cid en t  m a trices  is u s ed  to prov id e a co m p l e t e  pai of t h e a rcs  by  addi ng tem porary (Tem p) Place in Petri Nets as depict ed in Figure  8. T h e te m pora r y place also acts as the   to k e n   d e stin atio n wh en  th e curren t tok e n is re m o v e d fro m  th e activ e p lace.                  Fi gu re  8.  A  su bnet  t o   be  deac t i v at ed by   T1       Sin ce it is a reset activ ity, th e eq u i v a len t  LLD ru ng   b y  usi n g t y pe I II i s  s h ow n i n   Fi g u re  9 o n  t h e l e ft Sin ce step  Tem p  will b e  OFF wh en  it is activ ated , t h e i npu t is always  open e d and  acts  as an op en  co nn ection  as  shown   i n   Fi g u re 9  o n   th e rig h t . Th is p r o c ed ure will  en su re techn iqu e i n  [1 ] can  always b e   u s ed  in   a sink  tran sitio n. Th e similar p r o cedu r e is also applied  fo Ty p e   IV  p a ttern wh ere th e tem p o r ary in pu t step wi ll b e   repl ace d wi t h   an o p en c o n n e c t i on. T h e t ech ni q u e t o  use t e m porary  st ep i n  ge nerat i n g t h e eq ui val e nt   sub n et   LLD is im p o r tan t  to  en sure co n s isten c y in  th e orig i n al  algo rith m  in  [1 ].  On ce it is consisten t , it is ea sier to   devel o p  t h p r og ram  i n  a co m put er.        Fi gu re  9.  Fi nal  LLD  r u ng  f o r   PN s u bnet  Ty p e  II I       4 . 3 .   Critica lly   Una v a ila ble  Pa ttern  In a c o m p licated PN m odel s u ch as i n  Fi gure 2,  certai n   places cannot be c o nve r ted since the  s u bnet s   do  not  resem b l e  any  exi s t i ng pat t e rn t y pe s i n  [1] . Pre v i ous  pr o pose d   t echni q u e i n  S ect i on 4. 2 can not  be   appl i e d  si nce  t h e s u bnet s  i n  F i gu re  2 are  co m p l e t e  sub n et s . T hus fu rt he adj u st m e nt  i s  n eeded .   T 1        P 1    P 1   T 1   Tem p   In co m p lete p air  wi t onl y  a n i n put   arc  T1    P 1                 T1       P1        -1  Complete   pai r   with   i npu t   and   output   arcs                 T1       P1        1   T1   P1   Evaluation Warning : The document was created with Spire.PDF for Python.
In d onesi a n  J  E l ec En g &  C o m p  Sci    ISS N :  2 5 0 2 - 47 52       Alg o r ithm t o  C o n v ert S i g n a l  In terp reted  Petri Net mod e ls to Prog ra mma b l  ( Z .  As par)   91 1          P j     Ps 1     P s 2   Ps 3    .. . Ps k   T i       1     - 1       - 1       -1     .. . - 1   An d Pd 1  = Pd 2   = ...  P d n  = P j     Th e sub - BE can   b e   written  as:   a)   P j  = (Ps 1 .Ps 2 .Ps 3 . .. . .P s k ). T i   b)   The  B ool ea n equat i o n can  be gene ral i zed   by   follo win g  t h is  fo rm ula:  i k j T Ps P .        (5 )   i.   SET   Fig ur e   10  sh ow s a P 4  s u bnet  o f  S I P N   fr om   Fi gu re  2.  Th e s u b n et  i s   g o i n t o  be  act i v at ed  o r  set  at   P 5 Th is typ e  of  stru ct u r e do es no t ex ist in  typ e  I, II, II I and   IV.  If th e pro c ess is au to m a te d ,  t h p a ttern   can   be  wr on gly  inter p reted as  Ty pe  I II si nce  b o th l o ok  sim i lar. But  Ty pe  II I is  fo reset.   There  is m o re  than a  single place  connecte d  to tra n sition  TP1. If the  tra n sition  is activated, all the  places c o nnect ed t o  the  tra n si tion  will  be  activated. This al so  m eans P9 c a be i g nored  since the   place to  be   set  i s  P5 . B a se on  t h i s  as su m p ti on, t h e s u bnet   has  bec o m e  a Ty pe I  p a t t e rn.                   Fi gu re 1 0 . A P N   s u b n et  fr om   Fi gu re 2  t o   set       Give n one or  m o re source  pl aces, Ps and a  set of de stination  places, Pd a  single destination  place, Pj  can be c o nvert e d at a time by ignori ng the  other desti n ation places s o  tha t  Type I subne t  can be ge neralized   as:               ,                         ii.   RESET  Fi gu re  1 1  s h o w s a  su b n et  o f   SIP N   fr om  Fi gure  2 . T h pat t e rn  can  be  w r o ngl y  i n t e rp ret e d as  Ty pe  sin ce  b o t h  look similar .  Bu t Typ e  I is fo r set  w h ile th is is a  reset.                      Figu re 1 1 . A P N   s u b n et fr om   Figu re 2 fo r re set      A transitio n  at  T6  is sh ared   with  P1  and  P7 . To  d i sa ble  P1,  P7 m u st also active s o  that T6 can  be  activ ated Using  tran sform a t i o n techn i qu e,  o n e  of t h e p l ace can   b e  co m b in ed with th e t r an sitio n and  eli m in ate  the com b ined place from   the  subnet as shown in Figure  11  on the  righ t. After the trans f orm a tion proces s, the   PN  can   b e  cat eg or ized as Ty p e   I I I .   N o w ,  resu lt fr o m  tr ansf or m a tio n  is n o  lon g e r   pu r e  PN, it is know n as  sig n a l i n terp r e t e d   p e tr n e t (SIPN ) . Th e subnet I M  is as:   Th sub n e t IM is  as:                 P 4      P 5      P 9       TP 1         - 1                               The  s u bnet  IM  can be gene ral i zed fu rt he as:                    Ps 1     P s 2  ...  Ps k     P d 1        P d 2  .. . P j    T             - 1        - 1           -1                   . ..   1                P 5   P 9   P 4   TP 1  =  T 2 .*P 5   P 1   P 7   T 6   P 4   P 1   TP 2  =  T 6 .P 7   P 4   Evaluation Warning : The document was created with Spire.PDF for Python.
                        I S SN 2 502 -47 52  I ndo n e sian  J Elec Eng  & Com p  Sci, V o l. 10 No 3 ,  Jun e   2 018  :   90 5 – 91 91 2   Give n one or  m o re source pl aces, P s  and a set of destination  places, P d  a single destinat ion place, P j   can  be c o n v e r t e d at  a t i m e by  t r ans f o r m i ng o t her s o urce  pl a ces so  t h at  Ty p e  II I s u bnet  ca be  gene ral i zed as:                ,       iii.   SET   Fi gu re 1 2  s h o w s a su bnet   of  SIP N  fr om  Figu re 2 . The s u bnet  i s  g o i n g t o  be act i v at ed  or set  at  P 4 This type  of st ruct ure  does no t exist in type  I, II,  III a nd  IV. T o  sim p lify the subnet, pl ace P 8  can  be i g nore d   for the sam e  reason as in Type I. P1 and P7 places ar e combine d  to tran s f orm  into a new subnet as shown  i n   Figu re 1 2  o n  t h e rig h t. T h e trans f orm a tion is like in  Ty pe III  but the s u bnet is m o re com p licated than the  exam ple in Type  III.                    Figu re 1 2 . PN  fo Ty pe  I I       Aft e r t h e t r a n s f o r m a ti on p r oc ess, t h e P N  ca n be  cate g oriz ed as Type  II.  W ith ou t tran sform a t io n   pr ocess , t h e  re sul t  bec o m e s wr on g.  N o w,  r e sul t  f rom   transform a tio n  is n o  lon g e pu re PN, it is  k nown as  sig n a l i n terp ret e d   p e tri  n e t (SIPN). Th orig i n al su bn et IM  is as:                                P 14   P 1   T 1   P 4   P 7   T 6   P 8   T 1   TP 3  = P 1 .P 7   T 6   P 4   P 14                    P 1      P 4    P 7         T 6             -1           -1               After tran sfo r matio n                   P 1     P 4          TP 2          - 1        1    The  s u bnet  IM  can be gene ral i zed fu rt he as bel o w:                    Ps 1      P s 2  ...   P j      P d 1      Pd 2  ...   P d k   T             -1      - 1          - 1         1          1    ...    1                             P j        P d 1      P d 2  . ..  Pd k    TP          - 1          1          1    ...    1                Whe r e T P i  =  T i  . Ps 1 . Ps 2  .. . P sn   Th e sub - BE can   b e   written  as:   a)   P0 =  .. . +  P0.(P k  + T1)  b)   The  B ool ea n equat i o n can  be gene ral i zed   by   follo win g  t h is  fo rm ula  i k j j T Pd P P .      (6 )                 P 1     P 4        P 7      P 8      P 14   T 1           0       1         0        1       -1         T 6           - 1            - 1        0             After tran sfo r matio n              TP 3     P 4       P 14   T 1           0              -1         T 6           - 1        1             The  s u bnet  IM  can be gene ral i zed fu rt he as bel o w:                    P j        P s 1    Ps 2     Ps 3     P s 4      T                     0      - 1         - 1         0                T i + 1         1      - 1         0          0       0   T i + 2          1        0        0          0      -1                  Evaluation Warning : The document was created with Spire.PDF for Python.
In d onesi a n  J  E l ec En g &  C o m p  Sci    ISS N :  2 5 0 2 - 47 52       Alg o r ithm t o  C o n v ert S i g n a l  In terp reted  Petri Net mod e ls to Prog ra mma b l  ( Z .  As par)   91 3 Give n one  or  m o re source pl aces, P s  fo one tran sition ,  P j   can be  convert e d at a tim e  by trans f orm i ng  othe r s o urce  pl aces so that Ty pe  II  subnet ca be  gene ralized as:     Whe r e:            ,     Analyze c o lum n   by col u m n  (k) a n d row by  ro w ( i )  star ting w ith  th e top   row  ( i =0   iv .   RESET  Fig u r e  13  sh ow s a subn et of  SI PN  fro m   Fig u r e  3. Th su bn et in  Fi g u r e  13  is th e mo st co m p lex  subnet due to  feedbac k   places  and share d  tra n sitions at T 7 .P 5 . Due to fee dbac k   places and sha r ed tra n sitions,  th e PN  can   b e seen  as Typ e I  d u e to  two  inpu t tran s itio ns w h ich  in d i cates th e SET rung. H o w e v e r, Figu re  1 3   ( m id d le)  shows th e RESET ru ng , and th sim p l i fi cat i on a n d  by  el im i n ati ng  re du n d ant   of  P 5 the Figure 13  (ri g h t )  gi ves t h e co rrect  i n t e rp ret a t i on  of  Ty p e  I V  R E SE T r u ng                       Figu re 1 3 . PN  fo Ty pe  I V                           Give n one   or m o re  source pl aces,  P s  for one  transition  a n d one   or  m o re destination places,  P d  fo r  on tran sitio n, P j  c a n be c o nve rte d  at a tim e  by  trans f orm i ng othe r s o urce and desti n ation  places so that T y pe IV  sub n et   ca n be gene ral i zed  a s :      P j      Ps 2   Ps 3  TP 4   P d 3       Ti            -1        0            0        1               TT 4         - 1           0                    Whe r e T T4 =  Ti.Ps1.Ps 2 …. P sn    Ti here  is the  transition with  m o re  than one source places  a n d Ps is the  source  places.  TP4 = Pd1 +  Pd2 + …. Pdn     whe r e Pd  he re is  the destionation places of  one  tra n sition.    Th e sub - BE can   b e   written  as:   P 4   T 2 .P 5   P 5   T 7 .P 5   P 9   P 11   P 4   T 2 .P 5   P 5   T 7 .P 5   P 9   P 11   P 5   P 4   T 2 .P 5   TT 4 =T 7 .P 5 .P 5   TP 4  =P 9  + P 5   P 11                    P j      Ps 1     T P 2      Ps 4     T                     0        -1         0               T i + 1         1      - 1                    T i + 2          1        0                -1                  Whe r e T P 2  =  Ps 2 . Ps 3  ...   P s n   Th e sub - BE can   b e   written  as:   a)   P 0  = (P 1 .T 1 ) +  (P 2 .T 2 ) +  ( P 3 .T 3 ) +  ...  (P n .T n b)   The  B ool ea n equat i o n can  be gene ral i zed   by   follo win g  t h is  fo rm ula:  i k j T P P .        (7 )   Ori g in al su bn et IM is as  b e low:                   P 4     P 5        P 9      P 11      T 2             -1             1             T 7             -1     - 1         0              After tran sfo r matio n               P 4      T P 4      P 11   T 2           - 1        1         0         TT 4       - 1          0         1      The  s u bnet  IM  can be gene ral i zed fu rt he as bel o w:     P j     Ps 1   P s 2   P s 3   Pd 1   P d 2    Pd 3      T             -1        0      0       0              1        0    T i + 1        -1       -1      0       0              0        1  Evaluation Warning : The document was created with Spire.PDF for Python.
                        I S SN 2 502 -47 52  I ndo n e sian  J Elec Eng  & Com p  Sci, V o l. 10 No 3 ,  Jun e   2 018  :   90 5 – 91 91 4 a)   P 0  = + P 0 .(P 1  + T 1 ). (P 2  + T 2 ). ( P 3  + T 3 )  .  ...  .  ( P n  + T n By u s ing  m atri x  calcu lation ,  th resu lts is  sho w n :       i k j j T P P P .             ( 8 )     Whe r e:               ,               Fi gu re  1 4 . L L D  f o r r o bot  ar m  sy s t em  from  SIP N  i n  Fi gure 2  Evaluation Warning : The document was created with Spire.PDF for Python.