Intern ati o n a Journ a l of  Re con f igur able  and Embe dded  Sys t ems  (I JRES)  V o l. 4,  N o 2 ,  Ju ly 20 15 , pp . 14 2 ~ 16 I S SN : 208 9-4 8 6 4           1 42     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 / IJRES  Applicat ion of  New Approach of  design fl ow for  Hardware/S o ftware Emb e dded Syst em  wi th the Use of Desi gn  Patt erns  in Fuzzy cont rol sys t em       Al i  B o u y ah ya ,  Y a ssi ne  M a n a i ,   Jo seph  H a ggè ge   Departem ent  of  Ele c tri cal  Eng i n eering ,   Labor ato r y of Res earch  i n  Autom a tic  Co ntrol,  Nation a l   Engineering s c h ool of  Tunis, Univ ersity   of  Tunis el Manar ,  BP 37 , Belvéd ère, 100 2 Tunis, Tun i sia      Article Info    A B STRAC T Article histo r y:  Received Dec 12, 2014  Rev i sed   Mar  27 , 20 15  Accepted Apr 24, 2015      This paper present a new method of  concep tion of hardware/software  embedded s y stem design  methodolog y   based  on use of desi gn patter n   approach   c a ll ed  Abs t ract_fac tor y . W e  called th is new design t ool “smart  cel l”. Th e m a in idea of the con c eption of em bed d ed s y s t em s  des i gn is  bas e on the us ed of  object-o rien ted  des i gn ULM 2 .0. W h en the s m art-cel l is   im plem ented,  we justif the i r u s es as  a design  tool  that allows, first, to   develop a s p ec i f ied appl ica tion  of fuzz y  con t r o ller c a ll ed P D C (parall e distributed  conp ensation) . Seco n d , th specification of th e gen e ration phas e of the  s y st em  ar chit ectur e d e sig n , and  ev entua l l y  p a rt ition i ng th e app lic ation   on heterogen e o u s platform b a sed on  h a rdware resource DSP and FPGA  software to  illustrate the proposed approach.          Keyword:  Abst ract_Fact ory  an alytic m o d e Application/ Architecture  Ade q uacy  Design  p a ttern  Em bedded  sy st em   MAC_ Cos   MAC_Op eratio MA C_ Si n   UM L 2. 0   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 Ali Bou y ah ya,  Depa rtem ent of Elect ri cal  E n gi nee r i n g,   Nat i onal  En gi n eeri n Sc h ool  of   Tu ni s,   Uni v ersity of  Tunis el Mana r BP 37 , Belvé d ère,  1002 T u nis, T unisia.  Em a il: al i.b ouyah y a@g m ail. co     1.   INTRODUCTION   Th ere are two orien t atio ns i n  em bedded s y ste m s, the technologi cal  fi e l d a n d  t h e  m e t h o dol ogi cal   one . The m e t hod ol o g i cal  ori e nt at i on [ 1 ]  t r y  t o  devel o p t h e  em bedde d sy s t em  desi gn p r ocess by  e x am i n i ng  new  desi gn  t o ol s i n   or de r t o  decre a se t h e  c o m p l e xi t y  of e m bedded sy st e m s. There are  t h ree m a i n  pr o b l e m s   d u ring  th e syst e m  d e sig n :  th e co m p lex ity, t h e h a rd ware/so f t w are (HW/ SW) p a r titio n i n g  and  th e reusab ility.   M a ny  fram e wor k s are de vel ope d l i k e t r an sact i onal  en vi r onm ent s  bet w een ap pl i cat i on de vel o pm ent  and  architecture synthesis are use d  to si m p l i f y  the desi gn  p r oc ess. Desi gne rs  ar e recu rring  to  raise th e ab st raction  l e vel ,  f r om  R e gi st er T r ans f er  Level  (R T L t o  sy st em   l e vel .  As a c o nseq uence ,  a  gap   bet w ee n a ppl i cat i o n   devel opm ent  a n d  arc h i t ect ure  sy nt hesi s a p p ears [ 2 ,  3] .  I n   or der  t o  s o l v t h i s  p r o b l e m ,  m a ny  desi g n  t ool s a r devel ope d i n   or der t o  i m prove em bed d e d  sy st em  perfo rm ances [4,  5 ] . In t h e  fi el d  of c o nt rol  s y st em   im pl em ent a t i o n, m a ny  sol u t i ons   were  de ve l ope fo r l i n ea r t i m e i nvari an t  (LTI ) c o nt r o l  an d em bed d e d   real   t i m e  cont r o l  ap pl i cat i ons [ 6 - 8 ] .  In [ 9 ] ,  a desi g n  m e t hod ol o g y  based  on a t r a n sact i o nal   m o d e l  whi c h i s  i n s e rt ed  betwee n t h e a pplication a n d the a r c h itecture is  pre s ente d .   In  th is way, th e app licatio n  is refin e d in   an  in term ed iate le v e l wh ich  contain s  th e arch i t ectu r e p a ra m e ters. Fro m  th is lev e l, th e im p l e m en tatio n  step  is  achi e ve d i n   or der  t o   ge nerat e  t h e R T L  arc h i t ect ure.   Evaluation Warning : The document was created with Spire.PDF for Python.
                        I S SN 2 089 -48 64  I J RES Vo l. 4 ,  N o . 2 ,   Ju ly 2 015    14 –  160  14 3     Our ap pro ach  o f   d e si g n  t r y to  so lv e t h e com p lex i t y  p r o b l e m , it co n s ists  to  d e v e lop  t w o in term ed iate   envi ro nm ent s  i n   or der  t o  m i nim i ze t h e gap  bet w ee n a ppl i c at i on  devel o p m ent  and  arc h i t ect ure sy nt hes i s [1 0,   11 , 12 , 20 , 21 , 22] .    In o r der t o  de v e l op re usa b l e  desi g n  t o ol s i n  di ffer e nt  fi el d s , t h e desi g n  p a t t e rns we re us ed [1 3,  20] .   Ou r a p p r oach   i s  use d  i n  c o n t rol  fi el d  w h i c we  deve l o p   a fuz z y  co ntr o ller fo no nlin ear sy stem  (inverte d   p e ndu lu m ) . Man y  research es in  th is fiel d  are p e rform e d .  Th w o r k  of  [1 4, 15 de vel o p an object analysis   pat t e rn f o r em bed d e d  sy st em , fu rt her ,  a wra ppe r desi gn pa t t e rn fo r an ad apt i ng  beha vi o u r o f  t h e so ft  IPs w a s   p r op o s ed  in   [16 ] . Th e reu s abilit y o f  In tellectu a l Pro p e rty (IP)  b l o c k s  hav e  b e en   p e rfo rmed  ex ten s i v ely fo d e sign   h a rdware ap p licatio ns and   IP  b l o c k s  syn t h e sis [1 7-1 8 ] . Mak   [1 9 ]   p r esen ts a d e si g n  p a ttern  m o d e llin in   Un ified  Mod e llin g  Lan guag e  (UML). Man y  research es  are p e rfo r m e d  for th e reu s ab i lity p r o b l em  in  o r d e t o  devel op  ne w desi gn t o ol s  t h at  encaps u l a t e  al l  codesi g n  p h a ses in   o r der to  i m p l e m e n t in tellectu a p r op erty   (IP ) bl ocks  [2 0 ] . One at t e m p t   pr o pose d  i n  [ 2 1, 2 2 ]  ha ve as aim   t o  devel o p  t h sma r tcell  desi g n  t o ol s i n  or de r   to  im p l e m en HW and   SW IP b l o c ks for  h e terog e n e ou p l atfo rm s. Ou r co n t ribu tio n to   reso lv e th reu s ab ility   pr o b l e m  consi s t s  i n  t h e sy nt h e si s of IP  bl oc ks f o har d w a r e  and s o ft ware  sol u t i o ns f r o m  di rect  acy cl ic gra p h   (D AC ).  T h pr op ose d  a p pr oa ch e x am i n es t h Ab stra ct_Facto ry  d e sign   patter n  to pro duce th e app licati o n and  sy nt hesi s of   I P  bl oc ks H W / S W (FP GA/ DS P).   Thi s   pape r i s  or ga ni zed as  fol l o ws.  Sect i on  2 int r oduces the fuzzy  controller  PDC (Pa r allel  di st ri b u t e d C o m p ensat i on) a nd  Taka gi -S u g e no  f u zzy  sy st em . Sect i on  3, t h e a p pl i cat i on  of t h e p r o pos ed   app r oach t o  t h e i nve rt ed p e n dul um  i s  di scussed i n   de tails. Th e con c lusion  and  th fut u re works are  presente in  th e last sectio n of t h is p a p e r.        2.   FUZ Z Y  CONTROLLER  PDC (PARALL EL DIST RIB U TED  COMPENSATION)  Taka gi -S uge n o  fuzzy  m odel  i s  a m u l t i m odel ap pr oach  ve ry  use d  t o  m odel i ze no n l i n ea sy t e m s  by  co nstru c tion   with  id en tificatio n of inpu t-o u t p u t   d a ta.  Ma ny  m echanical syste m s are m odeling  with T - fuzzy   syste m .    Th e con tin ou sT-S  fu zzy m o d e l for a  no n l i n ear system  is written  as fo llows.  11 If  ( ) i s   a n d       th e n   () () ()  1 . . .... () () ip i p ii i zt M a n d z t i s M xt A x t B u t ir yt C x t        ( 1 )   Whic ( 1 , 2 .... , 1 , 2 ..... ) ij M ir j p  is th e fu zzy set and   r is th e nu m b er o f  m o d e l ru les,  n xt   is th states vector;   m ut  is th e inpu t v e cto r nn i A , the states m a trix,  nm i B    the control  a nd    1 , . . ... ., p zt z t are know premise    va riables.   Th e T-S fu zzy  m o d e l can  be  written  also  as  fo llow:                 11 11 , rr ii i i i ii rr ii ii wz t A x t B u t w z t C x t xt y t wz t w z t           r: is th e nu mb er of m o d e l ru les.  Wi t h               1 1 1, 2 , ,  r ii j j j i i r i i wz t M z t wz t hz t i r wz t        ( 2 )     The term   ij j M zt is th e grad e of  me m b e r s h i p  o f   j zt in ij M   Since               1 0 0 1 . .... . r i i i wz t wz t i r                         ,     W e  ha ve      1 01 1 i r i i hz t hz t     (3     Evaluation Warning : The document was created with Spire.PDF for Python.
I J RES I S SN 208 8-8 7 0 8     Ap pl i c at i o n  of   N e w  Ap pro a c h  of   desi g n  f l o w   f o r H a r d w a re/ Sof t w are  E m be dde Syst e m  …  ( A l i  Bouy a h ya )   14 4 Th fin a o u t pu t can b e  written  as fo llo           1 1 r ii i i r ii i x th z t A x t B u t yt h z t C x t           (4 )     The sy st em  used i n  t h i s   pa per  i s  t h n o n - l i n e a r i n vert e d   pe n dul um   m odel e by  Ta kagi - S uge n o   fuzzy  sy st em       mg M g Fk 3 x k 1 x k     Fi gu re  1.  I nve r t ed pe n dul um     The i nve rt ed  p e nd ul um  i s  m o del i s ed i n x1 88 , 8 8   b ecau s e it’ s no t co ntr o llab l e ar ound   2   and  2   The m e m b ersh i p  f u nct i ons   1 , 1 ,2 , 3 ,4 i hx t i  are obtained fr om  th pr odu cts  12 1 2 11 2 2 ,, e t FF F F    [2 3]                                          11 11 1 2 12 21 1 2 . . hx F F hx F F                                           21 31 1 2 22 41 1 2 . . hx F F hx F F                                                                      ( 5 )        1 1 1 c o s( ) 0 .034 8 1 0 .0348 x F  ,    2 1 1 1c o s ( ) 10 . 0 3 4 9 x F    ,   1 11 2 1 1.5359 sin( ) ( 1 .535 9 1 ) x x F x 2 11 2 1 1 . 53 59 ( s i n ( ) ) ( 1 .5 35 9 1 ) x x F x     The  In ve rt ed  p e nd ul um   m ode l i ng a n d  gi ves t h fol l o wi n g  m a t r i ces:     12 0 1 00 0 1 00 2 5 .91 161 - 0 .27 8 9 0 39.71 095 0.294 096 - 0 .27 8 9 0 3 9 .710 95 , 0 0 01 0 0 01 - 1 .1 193 0 . 0 122 2 0 - 1 4 . 8 0 1 - 0.01 270 4 0 .01 222 0 - 14.80 1 AA          34 0 1 00 0 1 00 25.91161 - 0 .2789 0 1 .3819 0.2 94096 - 0 .2789 0 1 .38 1 9 ,, 0 0 01 0 0 01 0.038951 0.00 04252 0 - 14.8 0 1 0 .0004421 0.0004252 0 - 14.801 AA          12 3 4 00 0 0 1. 7078 0. 05943 1.7078 0. 05943 ,, e t . 00 0 0 0. 02529 0. 02529 0. 02529 0. 02529 BB B B                        Fi nal l y  t h pen dul um  i nvert ed  i s  m odel i s ed v i a Taka gi -S ue n o  i n  4  r u l e s as  f o l l o w  :   Evaluation Warning : The document was created with Spire.PDF for Python.
                        I S SN 2 089 -48 64  I J RES Vo l. 4 ,  N o . 2 ,   Ju ly 2 015    14 –  160  14 5                     11 1 11 22 2 11 33 1 12 44 2 12 Ru l e 1 :  if    is F   the n   Ru l e 2 :  if    is F  th e n   Ru l e   3 :  if    is  F   th e n   Ru l e 4 :  if    is F  th e n   x tA x t B u t x yt C x t x tA x t B u t x yt C x t x tA x t B u t x yt C x t x tA x t B u t x yt C x t         Th PDC con t ro l law is written  is t h n e x t  equ a tio            1 1 1 r ii r i ii r i i i wz tF x t ut h z t F x t wz t         ( 6 )     i F  rep r esen ts the feedb ack   matrices stab iliz in g  th e system in  clo s ed  l o op . Th is can b e  fou n d e d  by th ap p lication   o f  t h e LM Is techn i q u e s (Lin ear  Matrix  In eq u a l ity) with  th e u s e th e LM I too l b o x  i n  Matlab .   The m a trices   i F  corresponding to  each  ru le a r e  written as  foll ow:     1 41 .2 12 3 2 8. 17 26 - 7 6. 17 26 119 .1 81 6 F       ( 7 )     2 2 3 .5 44 6.530 1 - 3 2 .6 125 34 .29 5 6 F        (8 )     3 22. 8 407 8. 8 906 - 4 5 . 7 8 9 2 1 22. 6 646 F        (9 )     4 14. 65 84 1 1 . 704 4 - 17. 06 76 5 3 . 431 5 F        (1 0)     Fo r th e m o d e lisatio n  and  co ncep tio n d e tails  for th e PDC con t ro ller, see   [23 ] Aft e we de sc ri be t h e Ta ka g i -Su g e no  fuzz y  sy st em t h e m odel i s at i on o f  t h e pe n dul u m  i nvert ed  wi t h  t h i s   technique and  we pre s ent the  PDC cont ro law. W e  p r esen th e approach  of conc eption of Hardwa re/Soft w ar Em b e d d e d Syste m  with  th Use of  Design   Pattern for th PDC co n t ro ller.      3.   DEFINITION OF THE  CONTE X OF T H E PROBLEM  In t h i s  a p p r oc h  of  de si g n  em bedde d sy st em  [20] We  de fi ne  fo u r   pri n ci pal s ’ act o r wh o a r e i n v o l v e d   in  th e op eration   o f  th e un ified  stru ct u r e. The first  is  related  t o  th e id en tificatio n   of m e th od fo r m o delin g   sp ecification ,   we call it th e ap p licatio n.  Th e seco nd related  p r ob lem with  th e syn t h e sis of IPs b l o c k s   HW /SW, we call it th e arch it ectu r e. Th e th i r d  is th c o mm unication bet w een the  diffe r ent st ruct ure,  that’s  mean s th e prob lem  o f  n e twork i n g  sub s ystem s  o f  th ov erall syste m . Th e fou r th   actor is th p a rtitio n i n g   har d ware  / so ftware T h e follo win g  fig u re  ill ustrat es t h e c o ntext  of the  unified st ruct ure. [20]       Evaluation Warning : The document was created with Spire.PDF for Python.
I J RES I S SN 208 8-8 7 0 8     Ap pl i c at i o n  of   N e w  Ap pro a c h  of   desi g n  f l o w   f o r H a r d w a re/ Sof t w are  E m be dde Syst e m  …  ( A l i  Bouy a h ya )   14 6       Fi gu re  2.  U n i f i e d st r u ct u r [2 0]       The unified s t ructure  is de com posed  by   four  princi pales actors: t h devel o ppe m ent of t h appl i cat i o n, t h e sy nt hesi s  of  t h e a r c h i t ect ure,  th e p a rtionn ing  of  th e h a rdware/software an d th e   com m uni cat i on.  We  de fi ne al l  t h i s  act or on e by   one .   There  are t w o levels of a b s t raction i n  the  design   o f  the PDC con t roller. In  th first lev e l of  ab straction ,  t h e wh o l e system   is  m o d e led   b y  th un ifie structure calle d «Unifie d  Structure system   level», it  brea ks  down the whole system into  subsyste m s , each of t h em  is  m odele d by a sec o nd-level unified st ruct ure   called «Uni fied St ruct ure  sec o nd le vel».    3. 1 Abs t r a cti o L e vel s  of   t h U n i f i e d Str u cture   Th is ap pro ach o f  two  level  ab straction   d e sig n   propo sed is illu strated   by th e fi g u re  3 [20 ] In th fo llowing  sectio n s , th e correspo nd ing  applicatio n  of  PDC controller a n d its arc h itecture a r de velope th ro ugh  th e un i f ied  st ru ct u r es  co rresp ond ing   to  th fu zzy mo d e d i sting u i sh ed.          Fig u re 3 .   Mu lti-lev e l d e sign   ab straction  [20 ]       For t h e i m pl em ent a t i on o f  t h e ha rd wa re and s o ft ware  bl ock s  IPs ,  t w o envi ro nm ent s  i n t e rfaci n g  wi t h   cards  o n  w h i c h t h e t a r g et  i s  goi ng t o  i m pl em ent  t h e em bedde d c ode e x a m i n ed, t h e C C S (C o d e C o m pos er           Unified Structure    sy ste m  level   Decom position  Verificatio n   Syste m   in teg r ation    Syste m   v a lid ation    Un i f ied  Stru ct u r e-seco nd    level  H-  m odel    Verificatio n   MAC_Mode l    Verificatio n   Validation of  application  Synthesis of   r e ssour ces   IPs   Verificatio n   Partitionning of   h a rd ware/so f tw  are   Verificatio n   Esti m a tio n   of  ress o u rces   Validation of  Architecture   schu d e ling  Valid atio n o f    Partitio nn ing  A pplica tion   A r chite cture   com m unication   P a rtition i ng U n ified  st ruct ure  Evaluation Warning : The document was created with Spire.PDF for Python.
                        I S SN 2 089 -48 64  I J RES Vo l. 4 ,  N o . 2 ,   Ju ly 2 015    14 –  160  14 7 Studi o 3.1) to interface  with soft wa re processor  DSP, and the Xilinx IS envi ronm ent interfacing with  FPGA  boa r d  [ 2 4, 25] .     3. Uni f i e d  St ructure  S y ste m  L e vel   Thi s  sect i on c ont ai n s  t h e m odel i n g o f  sy st em -l evel  appl i cat i on.  W e  p r esent  t h e gl o b a l   m odel  of   in v e r t ed   p e ndulu m . Su b s eq u e n tly, w e  pr esent th m o d e ling   o f  t h is syste m  i n  th e state space p l an t. Th e sy ste m   lev e l g r an u l arity  m o d e lin g  ap p lication  u s ed  in  th is appr oach  to  is th m o d e lisatio n  in  th e state sp ace o f  th phy si cal  sy st e m  (i nvert ed  pe nd ul um ).     3. Unified  Structure  Sec o n d  Level   I n  th is section ,  w e  p r esen t a dif f e r e n t  second- lev e l un if ied  str u ctur es su ch   as u n i f i ed  structu r e inp u t th e un ified  structu r e “con tro ller”,  p hysical syste m ” and  “ o utputs”.    3. 3. 1 Uni f i e d  Struc t ure Inp u t   Th un ified   stru cture inpu t con t ain  th e fo llowing   d a ta:  Th e acqu isitio n   o f  th e si g n a d e liv ered   b y  the setpo i n t   Th e m u ltip lica tio n  of th referen ce si g n a d e liv ered   b y  a matrix  g a i n  to  adj u st th e static g a in  o f  t h e clo s ed  loop system .   Transm issio n  of th e sign al su pp lied  to th e con t ro l d e v i ce.    3.3.2    Unified Structure  Contr o ller  Un i f ied  st ru ct ure co n t ro ller con t ain s  t h e fo llowing   d a ta:  Th e acqu isitio n   o f  th e si g n a d e liv ered   b y  the un ified stru ctu r e inp u t -   Gene rat i o of t h e c ont rol  si gn al -   Tran sm i ssi on o f  t h e  co nt r o l  si gnal  t o   the  phy sical  syste m   u n ified  stru cture.    3. 3. 3 Uni f i e d  Struc t ure Ph y s i c al   S y stem   The unified structure physical   co nt ai n t h e f o l l owi n dat a :   Acqu isitio n of  th e con t ro l si gn al su pp lied   b y  th e co n t ro d e v i ce,  -   Ad j u st i n g t h e  c ont rol  si gnal  t o  t h phy si cal   pr ocess.   -   Tran sm i ssi on o f  t h e  o u t p ut  si g n al  t o  t h o u t p ut  de vi ce.     3. 3. 4 Uni f i e d  Struc t ure Ou t put   The u n i f i e d st r u ct u r e out put   has  th e fo llowing  featu r es.  Acqu isitio n of  th e sign al  d e livered b y  t h p hysical syste m .   Gen e rating  th e ou tpu t  sign al.          Fi gu re  4.  U n i f i e d st r u ct u r e se con d  l e vel  [ 2 0]       The  be nefi t s   of i m pl em ent i ng  t h i s   uni fi ed  desi g n  a p p r oach  by  m a steri n g t h e c o m p l e xi ty  o f   e m b e d d e d syste m s stru cture;  first is so l v ing   th e co m p lex ity  b y   raising  t h lev e l of ab stractio n .  Seco nd  i s  the  reu s ab ility o f  IPs b l o c k s  to   min i mize th e t i m e-to -m ark e t, it  is reso lv ed   b y  th e d e v e l o p m en t o f  th e u n i fied   stru cture. Fi n a l l y, th e p r o b l em o f  au to m a ti n g   o f  t h e d e si gn  is pro cessed. In  ad d ition  to   th ese adv a n t ages, th is  ap pro ach illu str a tes o t h e objectiv es of  lo cal o r d e r. In  t h d e v e l o p m en t of  th un if ied str u ct u r second lev e l,  we e x am i n e t h ree m odel s  f o r  t h devel opm ent  o f  t h e a ppl i cat i on. T h fi r s t  m odel  i s  t h e m odel  of  t h uni fi e d   structure, t h e s econd is t h e a n alytical  m odel and  fina lly is th e m o d e l o f   MAC_Op eratio n   on   wh ich   we will   work to sy nthe size the arc h itecture.  In the  architecture, eac h sec o nd-level   u n i f i e d st ruct ure has a  p r oc ess  f o r   t h sy nt hesi s o f   i n t e l l ect ual  p r o p ert y  bl oc ks   IPs   ha r d wa re and   s o ft wa re.  Har d w a re IPs  are  sy nt hesi ze d wi t h   VH DL l a n gua ge,  w h i l e  t h e s o ft ware  IPs  are  sy nt hesi ze w i t h  t h e C  ++  l a ng ua ge.            I n put   Controller  Physical system  Output  Evaluation Warning : The document was created with Spire.PDF for Python.
I J RES I S SN 208 8-8 7 0 8     Ap pl i c at i o n  of   N e w  Ap pro a c h  of   desi g n  f l o w   f o r H a r d w a re/ Sof t w are  E m be dde Syst e m  …  ( A l i  Bouy a h ya )   14 8 4.   APPLI CATI O N DEVEL O PMENT   The de vel opm ent of t h e application is pe rformed accord ing to the algorithm presente d in Figure 5. It   co nsists in : first, th d e v e l o pmen t o f  t h e mo d e o f  th unified struct ure,  second t h dev e l opm ent  of a n al y t i cal   m odel  H, a n d   fi nal l y  t h dev e l opm ent  of  a  wo rk  m odel  b a sed  o n  t h e  M A C _ Ope r at i o n.  The  desi gn  p a t t e r n   Ab st ract_ F act ory is resp on sible to  fu lfill th task s o f  th e act o r  app licatio n. Fig u re 4  illu strates th e ap p licatio actor.           Fi gu re 5.   App licatio n  Actor  [20 ]       4. 1 Devel o pm ent of   th e Ana l yti c al  M o del   The  objective   of the a n alytical  m odel is t o   m ode l th e un ified  stru cture  pr oposed by t h e  state space   rep r ese n t a t i on  [2 0] . T h e a n al y t i cal   m odel  t h a t  we  pr o pose  i s  de fi ne by  t h e  f o l l o wi ng  eq u a t i on  [2 0]     ,, , Y            (1 1)   0 0 {, , , , , , : : : ;: ;: , n ii i n ii i AB C D X y u u i np ut v e c t o r o f t he s y s t e m y o ut pu t v e c t o r of t h e s y s t e m X s t a t e ve ct o r o f t h e s ys t e m Y y y p r o to c o l o f c o m m u n i c a tio n f f pr ot o c ol o f c o nt r o l XY          (1 2)     In  th is equ a tion s , th e m o d e e n capsulates the   m odel of syste m  wr itten in t h e state space plant, the  state vector, the input  vect or  an th e ou tpu t   v ector  repr e s ent s  t h e  pa rt   of t h e sy st em   di st ur ba nce.T h fu nct i o n set s  t h e com m uni cat i on bet w ee har d ware a n d   soft ware  res o urces.  In t h e analytical  m odel H we   defi ne yhree st eps.  In the  first  step we  de fine  the tra n sfe r  f u nct i o n  m odel  o f  t h uni fi ed st ruct ure.  The  se con d   step is to transform  each  transfe r  function  to the state space repr ese n tation  using a sim p lified com p anion  m odel. The third ste p  is to transf orm   the state space compani on m odel  re prese n tation  in the disc rete dom ain  usi n g t h ope ra t o to  devel o p recurrence s e q uations.      Developm ent o f   unified   structure m odel  D e velopm ent o f   anal yt ic   m odel  ,, , Y    Developm ent o f   work m odel  bas e d in  M A C_O p eration   unit  A pplica tion      actor Evaluation Warning : The document was created with Spire.PDF for Python.
                        I S SN 2 089 -48 64  I J RES Vo l. 4 ,  N o . 2 ,   Ju ly 2 015    14 –  160  14 9 4. 2 Devel o pm ent of   M o del  o f   W o rk   M A C   The de vel opm ent  of t h e m odel  of  w o r k   M A C  co nsi s t s  t o  t r ans f o r m  t h e recu rre nc es equat i ons   devel ope d f r o m  t h e anal y t i c al   m odel  t o  t h e gra p hs o f  t a sks  based  on t h e M A C _ ope rat i o n. A M A C _ O p erat i o n   (Mu ltip ly and   Accu m u late) is re p r esen ted b y  Figu re 6 [2 0 ]                                                  b                                 a                 c               Fi gu re  6.  M ac_ Ope r at i o n [ 2 0]                                  The  recu rre nce  eq uat i o n  o f  a  4t or de r i n ver t ed pe n dul um , i t  con v ert e d i n t o  a set   of  t a sks   as t h gra p hs s h o w n   in  Figur 7 .           Fi gu re 7.   Tra n s f orm a tion of  a recurre n ce  e quatio n   with  t h MAC un it [20 ]       Th e n e x t  sectio n  is d e v o t ed  to  th e syn t h e sis o f  em b e d d e d syste m  o f  o u r PDC stab iliza tio n  con t ro l law for  i nve rt ed pe nd u l um   sy st em     5.   SYNTHESIS OF  THE ARCHITECT URE  OF THE  CONTROL L A W PDC  The actor  of  Arc h itecture is  the responsi b le for sy nt hesis  the hard wa re IPs an d so ftw a re IPs that   realize the target architecture .  It is  withi n  this architecture  as the em be dded system  perform s  the de dicated  appl i cat i o n. T w o m e t hods o f  devel o pi n g  so ft ware a nd  ha r d wa re IPs are  di st i n g u i s he d.  The fi rst  m e t h od i s  t o   devel op t h e c ode t o  i m pl em ent  on t a rge t  boar d  by  ex am i n i ng t h e cor r es po n d i n g f unct i o ns . The  seco nd   m e t hod i s  t h e e xpl oi t a t i on  of  e x i s t i n g  com p i l e rs i n  M a t l a b s u ch  as R eal  Ti m e  Wo rks h op   (R T W ) e nvi ro nm ent .     5. 1.  De vel o p m ent  of  Arc h i t e c ture I P  S o f t   Thi s  sect i on e x am i n es t h e pr obl em  of i n t e g r at i on  of t h e cont rol  l a on  a DSP ca rd  us i ng t h e T L C   (Tar get  La ng u a ge C o m p i l e r)  of R eal  Ti m e   Wo r k sh o p  co m p il er and  de vel o pm ent  env i ro nm ent  C C S  IDE  T I   D S P.  b e lon g s  t o  th e TI C200 0 D S P f a m ily, t h e TI  TMS 320 C281 2.    x1[k]                           x2[ k ]                                                 x3 [ k ]                                                                            x4  [k]                               x1[ k +1]                     x2[ k + 1 ]                                      x3 [ k + 1 ]                               x4  [k+ 1 ]                                 y [ k ]                MA C   MAC   MAC   MAC   MAC   MAC   MAC   MAC   MAC   MAC   MAC   b c MAC   y = a+b*c  Evaluation Warning : The document was created with Spire.PDF for Python.
I J RES I S SN 208 8-8 7 0 8     Ap pl i c at i o n  of   N e w  Ap pro a c h  of   desi g n  f l o w   f o r H a r d w a re/ Sof t w are  E m be dde Syst e m  …  ( A l i  Bouy a h ya )   15 0 5. 2.  De vel o p m ent  of  Arc h i t e c ture I P  H a rd    Thi s  sect i on e x am i n es t h e pr obl em  of i n t e g r at i on  of t h e cont rol  l a on  a DSP ca rd  us i ng t h e T L C   (Tar get  La ng u a ge C o m p i l e r)  of R eal  Ti m e   Wo r k sh o p  co m p il er and  de vel o pm ent  env i ro nm ent  C C S  IDE  T I   D S P. Belong s t o  th e TI C200 0 D S P f a m ily, t h e TI  TMS 320 C281 2.      6.   IMPLEME N TATION OF  THE CONT ROL LA W PDC ON  HETEROGE NEOUS PLATFORM  In t h i s  sect i o n,  we p r ese n t  t h e im pl em ent a t i on  of t h e co nt rol  l a w P D C .   It  begi ns  by  b r eaki ng t h cont rol  sy st em   of a n  i n vert e d   pen d u l u m  i n  a set  of  uni fied s t ructures. T h second  phase is the de velopment of  th e ap p lication as a set o f  g r ap h s  task s. Th e last p h a se  i s  t h e sy nt hesi s of  har d ware an d s o ft ware I P s bl o c ks o f   het e r oge ne ous  archi t ect u r e.     6. 1.   Unified Desi gn Structure  At th e first lev e l o f  abstractio n  (system lev e l), th e co n t ro l system o f  in v e rted   p e ndu lu m  i s   decom pose d  i n t o  f o u r  s u b - sy s t em s (fuzzy  m odel s  T S ) a r m odeled by a second-level  un ified  st ru ct u r e. Th i s   d eco m p o s ition   is p e rfo rm ed  usin g th d e sign p a ttern   Ab tract_ F actory presen ted  i n  Fi g u re 8 .             Fi gu re  8.  Déc o m posi t i on o f  e m bedded  sy st em  wi t h  desi g n   pat t e rn  A b st rac t _Fact o r y  [ 20]   Em bedded  Sy s t em   Abst ract Factory    Create App ()  Create Arch ()    App licatio Out A p PhA pp Cm dA pp In A pp   Arc hitecture   Out A rc PhArc h Cm dArc h In Arc h   U S -In pu   Creat e A pp ()   Creat e A r ch  ()         US-C o n tr ol    Creat e A pp ()   Creat e A r ch  ()     US- p hy si syst    Creat e A pp ()   Creat e A r ch  ()   US- O utp u t     Creat e A pp ()   Creat e A r ch  ()     Evaluation Warning : The document was created with Spire.PDF for Python.
                        I S SN 2 089 -48 64  I J RES Vo l. 4 ,  N o . 2 ,   Ju ly 2 015    14 –  160  15 1 Aft e dec o m posi t i on  of t h sy st em  i n  st ruct ure  uni fi e d  f i rst  l e vel ,  we  devel op  u n i f i e d st r u ct ur es  seco nd l e vel .   We defi ne f o ur u n i f i e d st ru ct ures seco n d  l e vel .  Uni f i e d  st ruct ure i n p u t ,  wi ch c ont a i n t h acq u i sition  of th e inp u t  si g n a l  (setpo in t) m u ltip lied  b y  th e static g a in  to  con t ro l th e clo s ed  loo p  system . Th second  uni fied structure is the controlle r, it  contain t h e ele m entaries cont ro l laws with  stat es feedba ck for  each s u bsystem s  of the pe ndulum  inverte d   syste m . The th ird c ontai n the  m odelisation of physical syste m  and  t h e f o ort h  co nt ai n t h o u t p ut  s i gnal .   Whe n  we  exa m i n es t h pat t e rn  de si g n   Ab s t ract -Fact o r y   d e vel o ped   by  Fi gu re  8,   we s p e c i f y  t h ne xt   cl asses de vel o ped  by  C + +  wi t h  vi s u al  St udi o1 0.   -   C u st om er:  i s  t h e em bedded  sy st em Abst ract classe s: App licatio n, Arch itectu r e,   -   C onc ret e  cl ass e s:  In p u t ,  c ont r o l l e r,  Phy s i cal   Sy st em , out put A b st r act Pr oducts: I n A p p ,  Cmd a pp , Ph app ,  ou tAp p I n ar ch,  C m d a r c h ,  Ph arch Ou tar c h ,   In   Figu re  9 ,   we p r esen t little  p a rty of C++ co d e  of d e sign  p a ttern   Abstact-Facto r y t h at allo ws to  decom pose  t h e co nt r o l  sy st e m  of t h e i nve rt ed  pe nd ulum . T h e CreateApp (), CreateArch () a r functions   decl are d  vi rt u a l  t y pe. A vi rt u a l  funct i o n i s  a fun c t i on  defi ned i n  a cl ass and i s  i n t e n d e d  t o  be o v er ri d d en i n   deri ved  cl asses .           Fi gu re  9.  Desi gn  pat t e r n   A b s t ract -Fact o r y       6. 2.   Devel o pme n of Ap plicati o n  for In ver t ed  Pendulum  S y s t em     6. 2. 1.   A n al yti c al  Mo del   o f  the Co ntr o l   S y st e m   The  devel opm ent of the a n alytical  m odel H is ba sed  on the state space of each s u bsystem . There are   three  pha ses in the analytical m odel H. The   first phase  consists in  th d e v e lop m en t o f  t h e tran sfer functio n   m odel of the unified sec o nd l e vel struct ure .  The sec o nd   phase is to trans f orm  each  trans f er function in the   state space  usi n g a sim p lified represe n tation suc h  as m odi fi ed c o m p anion  m odel. The  t h ird  phase i n vol v es the   t r ans f o r m a ti on  of st at e repre s ent a t i on m o d e l  i n  t h e di scret e  dom ai n usi ng t h e o p erat or   to  d e v e lop th e   recurre nce e quations.   Th e an alytical m o d e l is represen ted   b y  th e follo wing  eq u a ti o n s     ,, , ( 1 3 ) Y    class abs F actory {  p u b lic:   virt ual Archite cture c r eatearc h ()                {     return ne w a r chitecture;  }    vi rt ual  ap pl i ca tion c r eateapp()                {    retur n   new  application;  }   class sysem b    {  p u b lic:  syse m b ( a b s Facto r y& f actor y)  architecture* Arc h itecture   = factory.c r eatea rch();   ap p lication *  Ap p licatio n =  fa ctory.createa pp();   } Evaluation Warning : The document was created with Spire.PDF for Python.