I nte rna t io na l J o urna l o f   P o w er   E lect ro nics   a nd   Driv e  Sy s t e m   ( I J P E DS )   Vo l.   9 ,   No .   4 ,  Dec em b er   2 0 1 8 ,   p p .   1 4 7 6 ~ 1 4 8 5   I SS N:  2 0 8 8 - 8 6 9 4 ,   DOI :  1 0 . 1 1 5 9 1 / i j p ed s . v9 . i 4 . pp 1 4 7 6 - 1 4 8 5          1476       J o ur na l ho m ep a g e :  h ttp : //ia e s co r e. co m/jo u r n a ls /in d ex . p h p / I JP E DS   M o deling  and Re a l - Ti m e  Si m ula ti o n of Induc tion  M o tor    U sing  RT - LAB       A .   H a m ed ,  A.   H a zz a b   De p a rt m e n t  o f   El e c tri c a l  En g in e e rin g ,   L a b o ra to ry   (CO A S EE ),   T a h ri  M o h a m e d   Be c h a r   Un iv e rsit y ,   A l g e ria       Art icle  I nfo     AB ST RAC T   A r ticle  his to r y:   R ec eiv ed   Mar   1 8 ,   2 0 1 8   R ev i s ed   A u g   1 2 ,   2 0 1 8   A cc ep ted   Sep   8 ,   2 0 1 8       T h is  p a p e r  p re se n ts  th e   m o d e li n g   a n d   re a l - ti m e   si m u latio n   o f   a n  in d u c ti o n   m o to r.   T h e   R T -   LAB  si m u latio n   so f t w a re   e n a b les   th e   p a ra ll e l  sim u latio n   o f  p o w e r  d riv e s  a n d   e lec tri c   c ircu it s  o n   c lu ste rs  o f   a  P C  ru n n in g   QN X   o r  RT -   L in u x   o p e ra ti n g   sy ste m s  a t  sa m p le  ti m e   b e lo w   1 0   µ s.  Us in g   sta n d a rd   S im u li n k   m o d e ls  in c lu d in g   S i m P o w e rS y st e m s   m o d e ls,   RT - LA B  b u il d   c o m p u tatio n   a n d   c o m m u n ica ti o n   tas k s  a re   n e c e ss a r y   to   m a k e   p a ra ll e l   sim u latio n   o f   e lec tri c a l  s y ste m s .   T h e   c o d e   g e n e ra ted   b y   th e   Re a l - T i m e   W o rk sh o p   o f   RT -   LA B  is  li n k e d   t o   t h e   O P 5 6 0 0   d ig it a l  re a l - ti m e   sim u lato r.   A  c a se   stu d y   e x a m p le  o f   re a l - ti m e   sim u latio n   o f   a n   i n d u c ti o n   m o to r   sy ste m   is   p re se n ted . T h is  p a p e r  d isc u ss e s  m e th o d s   to   o v e rc o m e   th e   c h a ll e n g e s  o f   re a l - ti m e   si m u latio n   o f   an   in d u c ti o n   m o to r  sy ste m   s y n c h ro n izin g   w it h   a   re a l - ti m e   c lo c k .   K ey w o r d :   RT - L A B   R ea l - T i m e   I n d u ctio n   m o to r   Mo d elin g     Si m u latio n   Co p y rig h t  ©   201 8  In s t it u te o f  A d v a n c e d   E n g i n e e rin g   a n d   S c ien c e .    Al l  rig h ts  re se rv e d .   C o r r e s p o nd ing   A uth o r :   A .   Ha m ed ,    Dep ar t m en t o f   E lectr ical  E n g i n ee r in g ,   L ab o r ato r y   ( C O A SEE ) ,   T ah r i M o h a m ed   B ec h ar   Un iv er s it y   A l g er ia  ,   B ec h ar   Un iv er s it y ,   Stre et  Of   I n d ep en d en ce ,   B P   4 1 7 ,   B ec h ar ,   A l g er ia .     E m ail:  h a m ed ali1 9 8 5 @ y ah o o . f r       1.   I NT RO D UCT I O N   T h e   in d u ctio n   m o to r   is   u s ed   i n   m a n y   i n d u s tr ial  s ec to r s   as  t h e  m ai n   ele m e n t  o f   co n v er ti n g   elec tr ical  en er g y   i n to   a  m ec h an ical  d r iv e  b ec au s e  o f   its   lo w   co s t,  r o b u s tn e s s ,   h i g h   d eg r ee   o f   r eliab ilit y   an d   g o o d   p o w er - to - w ei g h t  r atio .   Du e  to   it s   f e atu r e  s an d   h ig h   ap p licab ilit y   in   in d u s tr ial  f ield s ,   s tu d ie s   f o r   h ig h er   ef f icie n c y   h av e  al w a y s   b ee n   d e m a n d ed .   A s   test i n g   an d   v alid atio n   o f   in d u ctio n   m o to r   h as  b ec o m e  m o r e  an d   m o r e  i m p o r tan t  i n   t h e  d esig n   a n d   en g i n ee r i n g   p r o ce s s ,   t h e  n ee d   f o r   co n s ta n t   i m p r o v e m e n t  o f   c o m p o n en t   m o d eli n g   a n d   f o r   i n cr ea s in g   t h e  s p ee d   o f   p r o to ty p i n g   t h e  s y s te m   h a s   also   b ec o m e  g r ea ter .   C o n v e n ti o n all y ,   v alid atio n   o f   a  i n d u cti o n   m o to r   w a s   d o n e   b y   n o n - r ea l - ti m e  s i m u latio n   o f   t h e  co n ce p t  at  ea r l y   s ta g e  i n   th e  d e s ig n ,   an d   b y   test i n g   t h e  s y s te m   o n ce   th e   d esig n   is   i m p le m e n ted .   B u t  th is   m e th o d   h a s   s o m e  m aj o r   d r a w b ac k s : f ir s t,  t h e  leap   i n   t h e  d esig n   p r o ce s s ,   f r o m   o f f - li n e  s i m u la tio n   to   r ea l  p r o to t y p e   is   s o   w id e  th at   it  i s   p r o n e  to   m a n y   tr o u b les  a n d   p r o b le m s   r elate d   to   t h e   in te g r atio n   a t  o n ce   o f   d i f f er en t  m o d u le s ;  s ec o n d ,   th e   o f f - lin e,   n o n - r ea l - ti m e,   s i m u lat io n   m a y   b ec o m e   ted io u s l y   lo n g   f o r   an y   m o d er atel y   co m p le x   s y s te m ,   esp ec iall y   f o r   m o to r   d r iv es  w i t h   s w itc h in g   p o w er   elec tr o n ics   [ 1 ] .   R ea l - ti m e   s i m u lat io n   of   in d u ctio n   m o to r   is   a  v alu ab le   to o l  f o r   d ev elo p m e n t  an d   test in g   o f   co n tr o l . T w o   s it u atio n s   ca n   ar i s e  d ep en d in g   o n   t h e  ti m e  r eq u ir ed   b y   th e   s i m u latio n   p lat f o r m   to   co m p lete  t h e   co m p u tatio n   o f   s tate  o u tp u t s   f o r   ea ch   ti m e - s tep   ( F i g u r e   1 ) :  1 )   if   t h e  ex ec u tio n   ti m e,   T e,   f o r   th e  s i m u latio n   o f   th e  s y s te m   is   s h o r ter   o r   e q u al   to   th e   s elec ted   ti m e - s tep ,   th e  s i m u latio n   i s   co n s id er ed   to   b e   r ea l - ti m e  ( F ig u r e   1  ( a) ) ;  an d   2 )   if   T e  is   g r ea ter   th an   its   ti m e - s tep   s ize  f o r   o n e  o r   m o r e  ti m e - s tep s ,   o v e r r u n s   o cc u r   an d   th e   s i m u lat io n   is   co n s id er ed   as  n o n - r ea l - ti m e  o r   o f f lin e.   I n   th e  la tter   ca s e,   e ith er   th e  t i m e - s tep   ca n   b e  in cr ea s ed   o r   th e  s y s te m   m o d el  ca n   b e  s i m p lif ied   to   r u n   i t in   R ea l - T im e   [2 ] - [ 5] .    Evaluation Warning : The document was created with Spire.PDF for Python.
I n t J   P o w   E lec  &   Dr i   S y s t     I SS N:  2 0 8 8 - 8 694       Mo d elin g   a n d   R ea l - Time  S imu la tio n   o f I n d u ctio n   Mo to r   Usi n g   R T - LAB   ( A .   Ha med )   1477       F ig u r e   1 .   I llu s tr atio n   o f   r ea l - t i m e  an d   o f f li n e  s i m u latio n :  ( a)   R ea l - ti m e  s i m u latio n .     ( b )   No n - r ea l - ti m e  s i m u latio n       T h is   p ap er   p r esen ts   th e  m o d el in g   a n d   r ea l - ti m e  s i m u latio n   o f   an   i n d u c tio n   m o to r   in   a  p o w er   s y s te m .   Ma tlab /Si m u l in k   s o f t w ar e  is   u s ed   to   d ev elo p   th e  in d u ctio n   m o to r   m o d el.   T h e  g en er ated   co d e  o f   th e  Si m u li n k   m o d el  i s   li n k ed   to   th e  OP 5 6 0 0   d ig ital r ea l - t i m e  s i m u la to r   in   o r d er   t o   s i m u late  th e  i n d u ct io n   m o to r .   T h e  p ap er   is   d iv id ed   in to   s i x   s ec t io n s ,   t h e  h ar d w ar e  an d   s o f t w ar e  co n f i g u r atio n   o f   R T - L A B   i s   p r esen ted   in   s ec tio n   2 ,   s ec tio n   3   s h o w s   th e  m at h e m a tical  m o d el  o f   th e  in d u ct io n   m o to r ,   a  d etailed   m o d elin g   o f   an   in d u ctio n   m o to r   i n   R T - L A B     i s   s h o w n   i n   s ec io n   4 .   S ec tio n   5   ill u s tr ates   t h e  r ea l  t i m e  s i m u lat io n   r es u lt s   u s i n g   R T - L A B ,   f i n all y   th e  co n clu s io n   i s   d r a w n   i n   s ec tio n   6 .       2.   RT - L AB   CO NF I G UR AT I O N   RT - L A B   i s   a n   i n d u s tr ial - g r ad e  s o f t w ar e  p ac k a g e  f o r   e n g i n ee r s   w h o   u s e   m a th e m at ical  b lo ck   d iag r a m s   f o r   s i m u lat io n ,   co n tr o l  an d   r elate d   ap p licatio n s .   T h e  s o f t w ar e  u s e  p o p u lar   p r o g r a m m in g   to o ls   s u ch   as  M A T L A B /Si m u li n k   an d   wo r k s   w it h   v ie w er s   s u c h   as   L a b   VI E W   an d   p r o g r a m m in g   la n g u a g es  in cl u d i n g   C ++ .   R T - L A B   allo w s   t h e  u s e r   to   r ea d ily   co n v er t  Si m u l in k   Mo d els  to   r ea l - ti m e  s i m u latio n s ,   v ia  R ea l - T i m e   w o r k s h o p   ( R T W )   an d   r u n   th e m   o v er   o n e  o r   m o r e  P C   p r o ce s s o r s   [1 ] , [ 4 ] - [ 6] .     2 . 1 .     H a rdw a re   Co nfig ura t io n   RT - L A B   s o f t w ar e   r u n s   o n   a  h ar d w ar e  co n f ig u r atio n   co n s i s tin g   o f   co m m a n d   s tatio n   ( h o s t  n o d e) ,   tar g et  n o d es,  th e  co m m u n ica ti o n   lin k s   ( r ea l - ti m e   an d   E th er n et) ,   an d   th e  I /O  b o ar d s   [ 7 ] .      2 . 1 . 1 .   T he  Co mm a n d St a t io n   T h e  co m m a n d   s tatio n   is   a  PC   w o r k s tatio n   th at  o p er ates  u n d er   W in d o w s ,   an d   s er v es  as  th e  u s er   in ter f ac e.   T h e  co m m an d   s tati o n   allo w s   u s er s   to :   ed it  an d   m o d i f y   m o d els;   s ee   m o d el  d ata;  r u n   t h e  o r ig in a l   m o d el  u n d er   its   s i m u latio n   s o f t w ar e  ( Si m u li n k ,   S y s te m B u il d ,   etc. ) ;  g en er ate  an d   s ep ar ate   co d e;  an d   co n tr o l   th e  s i m u lato r 's Go /St o p   s eq u e n ce s   [ 7 ] .      2 . 1 . 2 .   T a rg et   no des   T h e  tar g et  n o d es  ar e  r ea l - tim e  p r o ce s s in g   an d   co m m u n i ca tio n   co m p u ter s   th at  u s e  c o m m er cial   p r o ce s s o r s   in ter co n n ec ted   b y   an   E th er n et  ad ap ter .   T h e  r ea l - t i m e  tar g e t n o d es p er f o r m :   a.   R ea l - ti m e  ex ec u tio n   o f   th e  m o d el’ s   s i m u latio n ;   b.   R ea l - ti m e  co m m u n icat io n   b et w ee n   th e  n o d es a n d   I /Os ;   c.   A cq u is it io n   o f   t h e  m o d el ’ s   i n t er n al  v ar iab les a n d   ex ter n a l o u tp u ts   t h r o u g h   I /O  m o d u les   [8 ] , [ 9] ;     Evaluation Warning : The document was created with Spire.PDF for Python.
                      I SS N :   2 0 8 8 - 8 694     I n t J   P o w   E lec  &   Dr i   S y s t ,   Vo l.  9 ,   No .   4 ,  Dec em b er   2 0 1 8   :    1476   –   1 4 8 5   1478       Fig u r e  2 .   C o m m u n icatio n   b etw ee n   th e  C o n s o le  an d   T ar g et  No d e       T h e  co m m a n d   n o d e  an d   tar g e t  n o d e  ar e  co m m er cial   P C ’ s   w it h   d if f er en t   o p er atin g   s y s te m .   A  P C I - 6 2 6   I /O  ca r d   ( f r o m   Se n s o r y   C o m p an y   I n c. )   is   u s ed   w h ic h   s at is f ies   all  I /O  r eq u ir e m e n ts .   Mo r eo v er ,   it  is   s u p p o r ted   b y   R T -   L i n u x   r ea l - ti m e  o p er atin g   s y s te m .   I n   th i s   co n f i g u r atio n   th e  o n l y   co m m u n ica tio n   li n k   u s ed   is   b et w ee n   t h e  tar g et  a n d   co m m an d   s tati o n   u s i n g   E th er n et  c o m m u n icatio n   [ 7 ] .      2 . 2 .   So f t wa re   Co nfig ura t io n   Fo r   th e  ab o v e  co n f ig u r atio n   o f   R T - L ab ,   th e  s o f t w ar e  i n   th e  co m m a n d   s tatio n   ( co n s o le)   is   W in d o w s ,   an d   th e  s i m u lat io n   s o f t w ar e  is   Ma tlab - Si m u li n k   to   p r o g r a m   th e  s i m u latio n   an d   co n tr o l  ta s k s .   T h e  s i m u lati on  p r o g r am   is   co d ed   in to   C   co d e  in   th e  co n s o l  u n i t  an d   tr an s f er r ed   to   th e  tar g et  n o d e,   w h ic h   h as  li n u x   o p er atin g   s y s te m .   T h e  tar g et  u n it  co m p i les  an d   ex ec u tes  t h e  C   co d e  f ile  in   p ar allel  w it h   th e  s i m u lati o n   p r o g r am   i n   th e   co n s o le.   T h e  d ata  is   tr an s f er r e d   o n - li n e  b et w ee n   t h e  tar g et  a n d   co n s o le  th r o w   co m m u n icat io n   E t h er n et.   I n   t h e   co n s o l statio n ,   th e  p r o g r a m   i s   w r itte n   i n   t w o   m ai n   b lo ck s   ( C o n s o l - Ma s ter ) .   SM_ :  m a s ter   s u b s y s te m .   T h er e  is   al w a y s   o n e   an d   o n l y   o n e  m aster   s u b s y s te m   in s id e  a  m o d el. it   co n tain s   th e  co m p u tatio n al  ele m en ts   o f   t h e  m o d el.   SC _ :  co n s o le  s u b s y s te m .   T h e  co n s o le  s u b s y s te m   is   th e   s u b s y s te m   o p er atin g   o n   t h e  co m m an d   s tat io n   th at  en ab les  y o u   to   in ter ac t  w it h   t h e  s y s te m   . it  co n tain s   all  th e  s i m u li n k /s y s te m b u il d   b lo ck s   r elate d   t o   ac q u ir in g   a n d   v ie w i n g   d ata  ( s co p e,   m an u al   s w itc h ,   to   w o r k s p ac e - t y p e  b lo ck s ,   etc) . th e   b lo ck s   y o u   n ee d ,   w h et h er   it  is   d u r in g   o r   af ter   th e  ex ec u tio n   o f   th e  r ea l - ti m e  m o d el,   m u s t  b e  in clu d ed   in   th e  co n s o le   s u b s y s te m . t h e  co n s o le  r u n s   as y n ch r o n o u s l y   f r o m   t h e  o th er   s u b s y s te m s . n o te  th at   t h er e  ca n   o n l y   b e  o n e   co n s o le  p er   m o d el   [ 1 0 ] - [ 12] .     2 . 3 .   O pco mm   Co mm u nica t io n B lo ck s   On ce   t h e  m o d el  i s   g r o u p ed   in t o   co n s o le  a n d   co m p u tatio n   s u b s y s te m s ,   s p ec ial   b lo ck s   ca lle d   o p co m m   b lo ck s   m u s t  b e  in s er ted   in to   t h e  s u b s y s te m s . t h ese   ar e  s i m p l e  f ee d - t h r o u g h   b lo c k s   t h at  i n t er ce p t  all  in co m i n g   s ig n al s   b ef o r e  s e n d i n g   th e m   t o   co m p u tatio n   b lo ck s   w it h i n   a  g i v en   s u b s y s te m . o p co m m   b lo ck s   s er v e  s e v er al  p u r p o s es .   W h en   a  s i m u latio n   m o d el  r u n s   in   t h e  R T - L A B   en v ir o n m en t,a ll  co n n ec tio n s   b et w ee n   th e  m ai n   s u b s y s te m s ( SC _ , SM_ , o r   SS _ ) ar e  r ep lace d   b y   h ar d w ar e  co m m u n icatio n   lin k s   . f o r   co m m u n icat io n   b et w ee n   r ea l - ti m e  tar g et  n o d es(SM _   an d   SS _ ) R T - L A B   u s es   ad esi g n ated   r ea l - ti m e   li n k . f o r   co m m u n icat io n   b et w ee n   th e  co n s o le( S C _ ) an d   th e  r ea l - t i m e  n o d es(SM _   o r   SS _ ) R T - L A B   u s es T C P /I P .   B ec au s e  o f   th ese  co m m u n icat io n   lin k s   b et w ee n   n o d es,  th e  s i m u lat io n   m a y   n o t  r u n   th e  s a m e  w a y   i n   s i m u li n k   o r   s y s te m B u ild   as   i n   R T - L A B .   I n   R T - L A B ,   a  c o m p u tatio n   s u b s y s te m   w ait s   f o r   r ec ep tio n   o f   all   s ig n al s   b ef o r e  it  is   ab le  to   s tar t  ca lcu lat i n g . i n   Si m u li n k   a n d   S y s te m B u ild , o n   th e  o t h er   h an d , co m p u tatio n s   p er f o r m ed   o n   a  s ig n al  s tar t  as   s o o m   as   t h e  s i g n al  i s   av a ilab le, Op C o m m   b lo ck s   e m u la te  t h e  b eh a v io r   o f   t h e   s y s te m   a s   it is   r u n   i n   R T - L A B   [ 1 0 ] .     2 . 4 .   Rec o rding   Da t a   w it h O pWrit eF ile   T o   o b tain   all  d ata  f o r   an y   p ar t icu lar   s i g n al,   u s e  th e  Op W r iteFil e  b lo ck   d ata  r ec o r d ed   w it h   th is   b lo c k   is   s to r ed   o n   th e  tar g et  r ea l - ti m e  n o d e ’ s   h ar d   d r iv e. th e  d ata   f ile  i s   au to m atica ll y   tr a n s f er r ed   to   th e  co m m an d   s tatio n   w h e n   th e  m o d el  is   r ese t   [ 1 0 ] .     2 . 5 .     E Xt re m e  H ig h P er f o r m a nc e  ( XH P )   M o de   T h e  XHP  m o d e  is   a  m ea n s   f o r   th e  r ea l - ti m e  o p er atin g   s y s te m   to   d is ab le  in ter r u p ts . th is   is   d o n e  o n   a   p er - s u b s y s te m   ( t h u s   p er - C P U)   b asic.n o t  allo w i n g   in ter r u p ts   p r ev en ts   p r o ce s s   s w itc h in g   w h ic h   r e m o v es   laten cie s   ti m e  f o r   ad d itio n al   co m p u ta tio n   in   th e   s a m e  ti m e  s lice.   T h e  XHP   m o d e  is   ai m ed   a t  r ea l - ti m e   ap p licatio n s   o f   a  g i v en   b as e  s a m p le  ti m e  th at  ca u s e  o v er r u n s   ( o v er f lo w   t h eir   allo w ed   ti m e - s tep   f o r   Evaluation Warning : The document was created with Spire.PDF for Python.
I n t J   P o w   E lec  &   Dr i   S y s t     I SS N:  2 0 8 8 - 8 694       Mo d elin g   a n d   R ea l - Time  S imu la tio n   o f I n d u ctio n   Mo to r   Usi n g   R T - LAB   ( A .   Ha med )   1479   co m p u tatio n )   w h ile  r u n n i n g   i n   R T - L A B   in   t h e  s ta n d ar d   m o d e.   I n   XHP   m o d e,   th e  m o d el  w ait s   in   a n   e m p t y   lo o p   f o r   its   n ex t sc h ed u led   s te p . th e  n ex t  m o d el  s tep   is   t h e n   co m p u ted .   I n   th is   m o d e,   w e  u s e  t h e  C P U  co u n ter   as  o u r   ti m e  r ef er e n ce . b ec au s e  th i s   co u n ter   o p er ates  at  t h e   C P U’ s   f r eq u e n c y ,   it  o f f er s   a  v er y   h ig h   r eso l u tio n ,   e v en   f o r   s tep - s ize  i n   th e  m icr o s ec o n d   r an g e. b ec au s e  t h e   co u n ter   r esid es   o n   t h e  C P U  an d   r ea d in g   its   v al u e  i s   d o n e  w it h i n   o n e   C P U  c y c le,   th is   o p er atio n   in tr o d u ce s   al m o s t  n o   laten c y   [ 1 0 ] .       3.   I NDUC T I O N  M O T O R  M O DE L I N G   T h e  m at h e m atica l  m o d els o f   i n d u ctio n   m o to r   in   t h e  p ar k   f r a m e  ar e  w r it ten   a s   f o llo w s   [ 1 3 ] - [ 19] .     V sd = R s . I sd + d ϕ sd dt − W a . ϕ sq     V sq = R s . I sq + d ϕ sq dt − W a . ϕ sd     V sd = R r . I rd + d ϕ rd dt − W r . ϕ rq       V rq = R r . I rq + d ϕ rq dt − W r . ϕ rd   ( 1 )     T h e  s tato r   an d   r o to r   f lu x es a r e   r elate d   to   th e  cu r r en t b y :     ϕ sd = L s . I sd + L m . I rd     ϕ sq = L s . I sq + L m . I rq     ϕ rd = L s . I rd + L m . I sd     ϕ rq = L s . I rq + L m . I sq   ( 2 )     T h e  s tato r   an d   r o to r   an g u lar   v elo cities ar e  lin k ed   b y   th e  f o ll o w i n g   r elatio n :      W s = W + W r   ( 3 )     T h e  eq u atio n s   o f   m ec h a n ical  a n d   elec tr o m ag n etic  to r q u es a r e:      J d Ω dt = T e − T m − f Ω   ( 4 )     T e = P ( ϕ rq I rd − ϕ rd I rq ) , Ω = W P   ( 5 )     w h er e :  R s   is   s tato r   r esis tan ce ,   R r   is   r o to r   r esis tan ce ,   L s   an d   L r   ar e  r esp ec tiv e l y   s ta to r   an d   r o to r   in d u ct an ce     L m   th e  m u tu al  in d u ctan ce ,   ϕ sd   an d   ϕ sq   ar e  th e  d ir ec t  an d   q u ad r atu r e  s t ato r   f lu x ,  ϕ rd   an d   ϕ rq   ar e  th e  d ir ec t  an d   q u ad r atu r e  r o to r   f lu x ,   I sd   an d   I sq   ar e  th e  d ir ec t  an d   q u ad r atu r e  s t ato r   cu r r en t,   I rd   an d   I rq   ar e  th e  d ir e ct  an d   q u ad r atu r e  r o to r   cu r r en t ,   P  is   th e  n u m b er   o f   p air   p o les,  W s   an d   W r   ar e  th e  as y n ch r o n o u s   a n d   r o to r   an g u lar   f r eq u en c y ,   T e   an d   T m   ar e  th e  elec tr o m a g n etiq u e  a n d   m ec h a n ical  t o r q u e ,   an d     F is   th e  v is co s it y   c o ef f icie n t.   T o   g et  a  m o d el  s tate  in   ter m s   o f   th e  r o to r   s izes  (   I rd   , I rq   , ϕ rd   , ϕ rq ) , W e  ex p r ess   th e  s tato r   s izes   (   I sd   , I sq   , ϕ sd   , ϕ sq )   in   ter m s   o f   r o to r   s izes   [ 1 3 ] .     I sd = ϕ rd L m −   L r L m   I rd     I sq = ϕ rq L m −   L r L m   I rq       ϕ sd = L s L m ϕ rd + δ   L m   I rd     ϕ sq = L s L m ϕ rq + δ   L m   I rq   ( 6 )     B y   u s i n g   eq u atio n s   ( 1 )   an d   th e  eq u atio n s   ( 6 )   o f   th e  I M,   w e   o b tain   th e  d y n a m ic  m o d el  o f   in d u ctio n   m o to r   h av i n g   as st a te  v ec to r   ( I rd   , I rq , ϕ rd   , ϕ rq   , w ):         d I rd dt = ( R s   L r +   R r   L s ) L m   I rd +   w a   I rq −   R s δ   L m 2   ϕ rq + L s δ   L m 2   w ϕ rq + V sd δ   L m − L s δ   L m 2 V rd     Evaluation Warning : The document was created with Spire.PDF for Python.
                      I SS N :   2 0 8 8 - 8 694     I n t J   P o w   E lec  &   Dr i   S y s t ,   Vo l.  9 ,   No .   4 ,  Dec em b er   2 0 1 8   :    1476   –   1 4 8 5   1480   d I rq dt = ( R s   L r +   R r   L s ) δ   L m 2   I rq +   w a   I rd −   R s δ   L m 2   ϕ rq + L s δ   L m 2   w   ϕ rd + V sd δ   L m − L s δ   L m 2 V rd     d ϕ rd dt = − R r . I rd + w a ϕ rq − w ϕ rq + V rd     d ϕ rq dt = − R r . I rq + w a ϕ rd − w ϕ rd + V rq     dw dt = P 2 J ( ϕ rq I rd −   ϕ rd I rq ) + P J ( T m − fw )   ( 7 )       4.   M O DE L I N G   I NDUC T I O N  M O T O R  I N  RT - L AB   I n   R T - L A B   all  to p - le v el  s u b s y s te m s   m u s t  b e  n a m ed   w it h   a  p r ef ix   id en ti f y i n g   th eir   f u n ctio n   . T h e   p r ef ix es   ar e:  S C _   f o r   co n s o l s y b s y s te m   an d   SM_   f o r   m aster   s u b s y s te m .   Dep en d in g   o n   t h e  t y p e  o f   d ata  ac q u is itio n ,   w e  p r o p o s e  t w o   R T - L A B   m o d el s ;  i n   th e  f ir s t  m o d el  t h e   d ata  tr an s f er   b et w ee n   t h e  tar g et  n o d e  a n d   th e   co n s o le  m ac h in e  is   d u r in g   t h e  s i m u lat io n   ta s k ,   h o w ev er   i n   t h e  s ec o n d   o n e,   th e  tr an s f er   w ill b e  d o n e  af ter   th e  en d   o f   s i m u la t io n   p er f o r m ed .       4 . 1 .   Da t a   Acquis it io n duri ng   Si mu la t io n   I n   th i s   ca s e  RT - L A B   en ab le s   s ig n al  ac q u is itio n   f r o m   a  r ea l - ti m e  tar g e t  d u r in g   s i m u la tio n   u s in g   Op C o m m   b lo ck   f o r   s y n c h r o n i za tio n   b et w ee n   tar g et  n o d e  an d   co n s o le.           Fig u r e  3 .   R T - L ab   R ea l - T i m e  s i m u latio n   g r ap h ic  m o d el  o f   I M           Fig u r e  4 .    Ma s ter   s u b s y s te m   o f   in d u ctio n   m to r   w it h   o p co m m   b lo ck       Evaluation Warning : The document was created with Spire.PDF for Python.
I n t J   P o w   E lec  &   Dr i   S y s t     I SS N:  2 0 8 8 - 8 694       Mo d elin g   a n d   R ea l - Time  S imu la tio n   o f I n d u ctio n   Mo to r   Usi n g   R T - LAB   ( A .   Ha med )   1481       Fig u r e  5 .  C o n s o le  s u b s y s te m   o f   in d u c tio n   m o to r   w it h   o p co m m   b lo c k       W e  u s e  Op C o m m   b lo ck   i n   m aster   an d   co n s o le  s u b s y s te m s ;   th e  co n s o l  s e n d s   t h e  s i g n al  o f     R esis ta n t   T o r q u e   to   th e  m a s ter   s u b s y s t e m   an d   th e  lat ter   s en d s   s ig n a ls   o f   I s a, I s b , I s c, I d s , I q s , Qr d , Q s d , C e, Sp ee d   to   th e  co n s o le  s u b s y s te m .     4 . 2 .   Da t a   Acquis it io n a f t er   t he  E nd   o f   Si m ula t io n   I n   t h is   ca s e,   w e  u s e   Op W r iteFil e  b lo ck   f o r   r ec o r d in g   al l  d ata  in   t h e  tar g et  n o d e’ s   h ar d   d is k ,   a n d   w h e n   th e  s i m u lat io n   en d s ,   t h e  tar g et  n o d e  s en d s   r ec o r d ed   d ata  in   m ate f i le  f o r m at  to   t h e  co n s o le.           Fig u r e  6 .   R T - L ab   R ea l - T i m e  s i m u latio n   g r ap h ic  m o d el  o f   I M  w it h   Op W r iteFil e  B lo ck       Evaluation Warning : The document was created with Spire.PDF for Python.
                      I SS N :   2 0 8 8 - 8 694     I n t J   P o w   E lec  &   Dr i   S y s t ,   Vo l.  9 ,   No .   4 ,  Dec em b er   2 0 1 8   :    1476   –   1 4 8 5   1482       Fig u r e  7 .  Ma s ter   s u b s y s te m   o f   in d u ctio n   m o to r   w it h   Op W r iteFil e  B lo ck       W e  u s e  an   Op W r iteFil e  b lo ck   in   m a s ter   s u b s y s te m   f o r   r ec o r d in g   s i m u lat io n   d ata            Fig u r e  8 .  C o n s o le  s u b s y s te m   o f   in d u c tio n   m o to r   w it h o u t   o p co m m   b lo ck       T h e  Op C o m m   b lo ck   i s   n o t u s e d   in   th e  co n s o le  s u b s y s te m .       5.   RE SU L T S  A ND  AN AL Y SI S     A ll t h e  s i m u lat io n s   ar e  ca r r ied   o u t o n   an   i n d u ctio n   m o to r   w h o s e  p ar am eter s   ar e  li s ted   in   t h e   T a b le  1.         T ab le  1 .   I n d u ctio n   m o to r   p ar a m eter s   P a r a me t e r s   S y mb o l s   I n p u t   v a l u e s   R o t o r   R e si st a n c e   S t a t o r   R e si st a n c e   R t o r   I n d u c t a n c e   S t a t o r   I n d u c t a n c e   I n d u c t a n c e   m u t u a l   P h a se   v o l t a g e     f r e q u e n c y   p a i r   o f   p o l e   Rr   Rs   Lr   Ls   Lm   V p h   f   p   3 . 8 1   4 . 8 5   0 . 2 7 4   0 . 2 7 4   0 . 2 5 8   2 2 0   50   2       W e  ap p lied   a   r esis tan t to r q u e  t o   th e  in d u ct io n   m o to r   at  ti m e  2 . 0   s   to   3 . 0   s .   Fig u r e  9   s h o w s   t h e  s p ee d   r esp o n s e  in   r ea l - ti m e  s i m u lati o n   in   d if f er e n t ti m es  s tep s . T h r o u g h   th e  r ed   cu r v e  w e  n o te  th at  th er e  is   n o   d ata  Evaluation Warning : The document was created with Spire.PDF for Python.
I n t J   P o w   E lec  &   Dr i   S y s t     I SS N:  2 0 8 8 - 8 694       Mo d elin g   a n d   R ea l - Time  S imu la tio n   o f I n d u ctio n   Mo to r   Usi n g   R T - LAB   ( A .   Ha med )   1483   lo s s   w h e n   w e  u s e  3 0   µs a s   ti m e - s tep ,   T h e  r esp o n s e  is   t h e  s a m e  as i n   o f f li n e  s i m u latio n . I n   th e  s ec o n d   ca s e,   w h e n   w e  u s e  2 0   µs a s     ti m e - s t ep   it is   s h o w n   clea r l y   i n   t h e  zo o m   g r ap h   t h at  it st ar ted   to   lo s s   d ata,   Ho w e v er   in   th e  last   ca s e  w h e n   w e  u s e  1 0   µs a s   ti m e - s tep   w e  o b s er v e  th a t d ata  w as c o n s id er ab l y   lo s t a n d   th e  s ig n al  o f   t h e  s p ee d   h as c o m p letel y   ch a n g ed .           Fig u r e  9 .   Sp ee d   r esp o n e   of   in d u ctio n   m o to r   in   d if f er en t ti m e - s tep s       W e  co n clu d e  t h at  t h e  ac q u i s iti o n   d ata  f r o m   th e   tar g et  n o d e  d u r in g   s i m u lat io n   lead s   to   th e  d ata  lo s s   i f   th e  ti m e - s tep   is   s m a ll  th e n   2 0   µs,  b ec au s e  T C P /I P  is   r elativ el y   s lo w   co m p ar ed   w it h   m o s t   r ea l - ti m e  s y s te m s   lik e  f ir eW ir e - t y p e  n et w o r k .   Fig u r e  1 0   s h o w s   t h e  s p ee d   r esp o n s e  in   s ec o n d   p r o p o s al  w h er e  Op W r iteFil e  b lo ck   is   u s ed .   I n   th is   ca s e  th e   tar g et  n o d e  d o es  n o t  s en d   d ata  to   t h e  co n s o le  w h ile   th e  s i m u la tio n   i s   r u n n i n g .   Af t er   s i m u latio n   e n d s ,   th e  tar g et  n o d e  s en d s   t h e  r ec o r d ed   d ata  in   h ar d   d i s q u e  o f   tar g et  as  m a t  f i le  co n te n t  all  s i g n al  in f o r m a tio n   to   th e  co n s o le.             Fig u r e  1 0 . s p ee d   r esp o n e  o f   in d u ctio n   m o to r   i n   r ea l - ti m e  w it h   o p w r ite f ile  b lo ck       W e  n o te  f r o m   th e  c u r v e  t h a t  alth o u g h   v er y   s m all  ti m e - s tep   is   u s ed   co m p ar ed   to   th e   p r ev io u s   ex p e r i m e n t,  n o   d ata  lo s s   o cc u r r ed   j u s t  as  in   o f f li n e  s i m u la ti o n .   L ater ,   a  s i m u latio n   atte m p t  w it h   ti m e - s tep   as   0 , 1   µs c au s ed   o v er r u n s   a n d   th e  s i m u lato r   s h o w ed   t h e  f o llo win g   er r o r   m es s ag e     Evaluation Warning : The document was created with Spire.PDF for Python.
                      I SS N :   2 0 8 8 - 8 694     I n t J   P o w   E lec  &   Dr i   S y s t ,   Vo l.  9 ,   No .   4 ,  Dec em b er   2 0 1 8   :    1476   –   1 4 8 5   1484       Fig u r e  1 1 .   O v er r u n s   d etec ted       6.   CO NCLU SI O N     I n   t h is   p ap er   w e   p r o p o s ed   t w o   R T - L A B   m o d els   f o r   r ea l - ti m e  s i m u latio n   o f   th e   i n d u ctio n   m o to r ,   i n   th e  f ir s t,  m o d el,   d ata  ac q u is i ti o n   w a s   d u r i n g   s i m u la tio n ,   h o w e v er   in   t h e  s ec o n d   m o d el,   d ata  ac q u is itio n   w as   af ter   th e  e n d   o f   s i m u la tio n ,   T h e  s i m u latio n   r es u lt s   s h o w   t h a t  in   th e  f ir s t  m o d el  w e  g o t  d ata  lo s s   w h e n   w e  u s e   s m al l  ti m e - s tep   b ec au s e   T C P /I P   is   r elativ el y   s lo w   co m p ar ed   w it h   r ea l - ti m e  s y s te m s   li k e  f ir eW ir e - t y p e   n et w o r k .   Ho w ev er   i n   t h e  s ec o n d   m o d el  n o   d ata  lo s s   o cc u r ed .       RE F E R E NC E S     [1 ]   S .   A b o u ri d a ,   e t  a l. ,  “ Ha rd w a re - in - th e - l o o p   sim u latio n   o f   f in it e - e lem e n t  b a se d   m o t o r  d riv e s  w it h   RT - LAB  a n d   JMAG , ”   In d u stria l  El e c tro n ics ,   2 0 0 6   IEE E   In ter n a ti o n a l  S y m p o siu m o n ,   p p .   2 4 6 2 - 2 4 6 6 ,  2 0 0 6 .   [2 ]   J.  Be lan g e r,   e t  a l. ,  “ T h e   w h a t,   w h e re   a n d   w h y   o f   re a l - ti m e   si m u lati o n , ”   P la n e t  RT ,   v o l.   1 ,   p p .   2 5 - 2 9 ,   2 0 1 0 .   [3 ]   M .   O.  F a ru q u e ,   e t  a l. ,  “ Re a l - ti m e   si m u latio n   tec h n o l o g ies   f o r  p o w e r   s y st e m s  d e si g n ,   tes ti n g ,   a n d   a n a ly sis, ”   IEE E  Po we r a n d   E n e rg y   T e c h n o l o g y   S y ste ms   J o u rn a l ,   v o l.   2 ,   p p .   6 3 - 7 3 ,   2 0 1 5 .   [4 ]   O.  Cră c iu n ,   e t  a l. ,  “ Ha rd w a re - in - th e - l o o p   tes ti n g   o f   P V   c o n t ro l  sy s te m s  u sin g   RT - L a b   sim u lato r, ”   Po we r   El e c tro n ics   a n d   M o ti o n   Co n tro l  Co n fer e n c e   ( EP E/ PE M C),   2 0 1 0   1 4 th   I n ter n a ti o n a l ,   p p .   S 2 - 1 - S2 - 6 ,  2 0 1 0 .   [5 ]   C.   Du f o u r,   e t  a l. ,  “ Ha rd w a re - in - th e - lo o p   sim u latio n   o f   p o w e r  d riv e s  w it h   RT - LAB, ”   Po we r  El e c tro n ics   a n d   Dr ive s  S y ste ms ,   2 0 0 5 .   PE DS   2 0 0 5 .   In ter n a ti o n a l  C o n fer e n c e   o n ,   p p .   1 6 4 6 - 1 6 5 1 ,   2 0 0 5 .   [6 ]   A .   Id ir  a n d   M .   Kid o u c h e ,   “ Rt - lab   a n d   d sp a c e :  t w o   so f t wa re s   f o r  r e a l  ti m e   c o n tro l  o f   in d u c ti o n   m o to rs, ”   Rev .   Ro u m.  S c i.   T e c h n . – É lec tro tec h n .   e t  Én e r g ,   v o l.   5 9 ,   p p .   2 0 5 - 2 1 4 ,   2 0 1 4 .   [7 ]   M .   A .  G e li e l,   “ Re a l - ti m e   i m p lem e n tatio n   o f   c o n stra i n e d   c o n tr o l   sy st e m   o n   e x p e rim e n ta l  h y b rid   p lan t  u sin g   RT - L a b , ”   Co n tro l  a n d   A u t o ma ti o n ,   2 0 0 8   1 6 th   M e d it e rr a n e a n   Co n fer e n c e   o n ,   p p .   1 0 6 0 - 1 0 6 5 ,  2 0 0 8 .   [8 ]   X.   Y .   X u   a n d   L .   W a n g ,  “ RT - LAB  Ra p id   Co n tr o l  P ro t o ty p in g ' s   Ap p li c a ti o n   in   S e rv o   S y ste m , ”   J o u rn a l  o f  S y ste m   S imu l a ti o n ,   v o l.   4 ,   p p .   0 6 2 ,   2 0 0 6 .   [9 ]   H.   l.   Z h e n g ,  e t  a l. ,  “ RT - LA B   b a se d   re a l - ti m e   si m u latio n   o f   p h o to v o l taic   p o w e r  g e n e ra ti o n   sy ste m , ”   Ad v a n c e d   T e c h n o l o g y   o f  E lec trica l  En g i n e e rin g   a n d   E n e rg y ,   v o l.   4 ,   p p .   0 1 4 ,   2 0 1 0 .   [1 0 ]   F .   G .   A re e d ,   e t  a l. ,  “ A d a p ti v e   n e u ro - f u z z y   c o n tro l  o f   a n   in d u c ti o n   m o to r, ”   Ai n   S h a ms   En g in e e rin g   J o u rn a l ,   v o l.   1 ,   p p .   7 1 - 7 8 ,   2 0 1 0 .   [1 1 ]   C.   Du f o u r,   e t  a l. ,  “ RT - LA B   re a l  ti m e   si m u latio n   o f   e lec tri c   d ri v e s  a n d   s y ste m s, ”   Na ti o n a l  Po we r  El e c tro n ics   Co n fer e n c e – NPE C ,  2 0 0 5 .   [1 2 ]   H.  G u o ,   e t  a l. ,  “ Re a l - ti m e   si m u la ti o n   o f   BL DC - b a se d   w in d   tu rb i n e   e m u lato r  u sin g   RT - LA B, ”   El e c trica l  M a c h in e s   a n d   S y ste ms ,   2 0 0 9 .   ICEM S   2 0 0 9 .   In ter n a t io n a l  C o n fer e n c e   o n ,   p p .   1 - 6 ,  2 0 0 9 .   [1 3 ]   A .   M .   F ih a k h ir  a n d   M .   Bo u h a m id a ,   “ No n li n e a r  Co n tr o l  o f   a   Do u b ly   F e d   In d u c ti o n   G e n e ra to r  Driv e n   W in d   T u rb in e , ”   El e c tro teh n ica ,   El e c tro n ica ,   Au t o ma ti c a ,   v o l.   6 4 ,   p p .   2 3 ,   2 0 1 6 .   [1 4 ]   M .   Ja n n a ti ,   e t  a l. ,  “ In d irec t  ro t o r  f ield - o rien ted   c o n tr o l  o f   f a u lt - to lera n t  d riv e   s y ste m   f o r  th re e - p h a se   in d u c ti o n   m o to r  w it h   ro t o r  r e sista n c e   e s ti m a ti o n   u sin g   EKF , ”   In d o n e sia n   J o u rn a l  o f  E lec trica l  E n g i n e e rin g   a n d   Co m p u ter   S c ien c e ,   v o l.   1 2 ,   p p .   6 6 3 3 - 6 6 4 3 ,   2 0 1 4 .   [1 5 ]   M .   Ja n n a ti ,   e t  a l. ,  “ S p e e d   se n s o rles s  f a u lt - to lera n t  d riv e   sy ste m   o f   3 - p h a se   in d u c ti o n   m o to r  u sin g   sw it c h in g   e x ten d e d   k a l m a n   f il ter, ”   In d o n e s ia n   J o u rn a l  o f  El e c trica l  E n g i n e e rin g   a n d   Co m p u ter   S c ien c e ,   v o l .   1 2 ,   p p .   7 6 4 0 - 7 6 4 9 ,   2 0 1 4 .   [1 6 ]   V .   Ku m a r,   e t  a l. ,  “ I m p le m e n tati o n   o f   S c a lar  Co n tro l  T e c h n iq u e   in   S VP W M   S w it c h e d   T h re e - Lev e l  In v e rter  F e d   In d u c ti o n   M o t o r  Us in g   DS P   Co n t ro ll e r, ”   In ter n a ti o n a l  J o u rn a l  o f  Po we r  El e c tro n ics   a n d   Dr ive   S y ste ms ,   v o l.   1 ,   p p .  8 3 ,   2 0 1 1 .   Evaluation Warning : The document was created with Spire.PDF for Python.
I n t J   P o w   E lec  &   Dr i   S y s t     I SS N:  2 0 8 8 - 8 694       Mo d elin g   a n d   R ea l - Time  S imu la tio n   o f I n d u ctio n   Mo to r   Usi n g   R T - LAB   ( A .   Ha med )   1485   [1 7 ]   L .   L a h c e n ,   “ F u z z y   S li d in g   M o d e   Co n tr o ll e r  f o r  In d u c ti o n   M a c h i n e   F e e d   b y   T h re e   L e v e l  In v e rter, ”   In ter n a ti o n a l   J o u rn a l  o f  P o we r E lec tro n ics   a n d   Dr ive   S y ste ms   ( I J PE DS ) ,   v o l.   9 ,   2 0 1 8 .   [1 8 ]   H.  Oth m a n i ,  e t  a l. ,  “ F u z z y   Ga in - S c h e d u l in g   P r o p o rti o n a l - I n teg ra l  c o n tr o l   f o r  Im p ro v in g   th e   s p e e d   b e h a v io r   o f   a   th re e - p h a se s in d u c ti o n   m o to r, ”   I n ter n a ti o n a l  J o u rn a l  o f   Po we r E le c tro n ics   a n d   Dr ive   S y ste ms ,   v o l.   7 ,   2 0 1 6 .   [1 9 ]   E.   Ra m p ra sa th   a n d   P .   M a n o jk u m a r,   “ M o d e ll in g   a n d   a n a ly sis   o f  in d u c ti o n   m o to r  u sin g   L a b V IE W , ”   In ter n a ti o n a l   J o u rn a l  o f  P o we r E lec tro n ics   a n d   Dr ive   S y ste ms ,   v o l.   5 ,   p p .   3 4 4 ,   2 0 1 5 .       B I O G RAP H I E S   O F   AUTH O RS          Ha m e d   A li   wa s b o rn   o n   1 8 t h   d e c e m b e r  1 9 8 5   i n   b e c h a r,   A lg e ria h e   re c e iv e d   th e   in g e n io ra t   d e g re e   in   c o m p u ter  sc ien c e   f ro m   th e   B e c h a r  Un iv e rsit y ,   A lg e ri a   in   2 0 0 8   a n d   th e   m a ste r   d e g re e   in   c o m p u ter  sc ien c e   f ro m   th e   T a h ri  M o h a m m e d   Be c h a r  Un iv e rsit y ,   A l g e ria  in   2 0 1 2 .   In   2 0 1 4 ,   h e   w a s  a   lab o ra to ry   m e m b re   a t,   L a b o ra to ry   o f  Co n tro l  A n a ly sis  a n d   Op ti m iz a ti o n   o f   th e   El e c tro - En e rg e ti c   S y ste m s  (C A OSE E).   His  re se a rc h   in terre st  c o v e rs,  p o w e r   e lec tro n ics   e le c tri c   d riv e s   c o n tro l,   re a l - ti m e   si m u latio n   a n d   a rti f icia l  in telli g e n c e .     e - e m a il   :  h a m e d a li 1 9 8 5 @y a h o o . f r       Ha z z a b   A b d e ld jeb a r   re c e iv e d   th e   sta te en g in e e r   d e g re e   in   e lec tri c a l   e n g in e e rin g   in   1 9 9 5   f ro m   th e   Un iv e rsit y   o f   S c ien c e s  a n d   T e c h n o lo g y   o f   Or a n   (UST O),  A lg e r ia  th e   M . S c .   d e g re e   f ro m   th e   El e c tri c a l  En g in e e rin g   In stit u te  o f   th e   UST O  in   1 9 9 9 ,   a n d   th e   P h . D.  d e g re e   f ro m   th e   El e c tri c a l   En g in e e rin g   In stit u te2   o f   th e   UST O  in   2 0 0 6 .   He   is  c u rre n tl y   p ro fe ss o r  o f   e l e c tri c a l  e n g in e e rin g   a t  Un iv e rsit y   o f   Be c h a r,   Be c h a r,   A lg e ria,  w h e re   h e   is  Dire c to r  o f   th e   Re se a r c h   L a b o ra to ry   o f  Co n tr o l  A n a ly sis  a n d   Op ti m iza t io n   o f   th e   El e c tro - En e rg e ti c   S y ste m s.  His  re se a rc h   in tere st s  in c lu d e   p o w e r  e lec tro n ics ,   e lec tri c   d riv e s  c o n tr o l,   a n d   a rti f icia l  in telli g e n c e   a n d   t h e ir  a p p li c a ti o n s.     Evaluation Warning : The document was created with Spire.PDF for Python.