CFPRIME INTEB                                                           INTEB       1
C***********************************************************************RIGHTE      1
C*                                                                     *RIGHTE      2
C*        Extended Transient-Midterm Stability Program (ETMSP)         *RIGHTE      3
C*        ====================================================         *RIGHTE      4
C*                                                                     *RIGHTE      5
C*       Copyright (C) (1993) Electric Power Research Institute        *RIGHTE      6
C*                                                                     *RIGHTE      7
C* EPRI reserves all rights in the software and associated             *RIGHTE      8
C* documentation as delivered. The software and its associated         *RIGHTE      9
C* documention or any portion thereof may not be reproduced in any form*RIGHTE     10
C* whatsoever without the consent of EPRI, except as explicity provided*RIGHTE     11
C* for by license. Licensee shall submit a detailed description to EPRI*RIGHTE     12
C* of any changes or modifications to the software within two (2)      *RIGHTE     13
C* months after such changes or modifications are made. At EPRI's sole *RIGHTE     14
C* discretion, the software, as changed or modified, shall be given a  *RIGHTE     15
C* new designation sufficiently different from its then current        *RIGHTE     16
C* designation as to prevent mistake,confusion, or deception as between*RIGHTE     17
C* the current software as changed or modified.                        *RIGHTE     18
C*                                                                     *RIGHTE     19
C* A license under EPRI's rights in the software can be obtained       *RIGHTE     20
C* directly from EPRI.                                                 *RIGHTE     21
C*                                                                     *RIGHTE     22
C* This program and supporting materials may be independently available*RIGHTE     23
C* from Electric Power Software centre (EPSC) for an appropriate       *RIGHTE     24
C* distribution fee. The EPSC is a service of                          *RIGHTE     25
C*                                                                     *RIGHTE     26
C*                    Power Computing Company                          *RIGHTE     27
C*                    1930 Hi Line                                     *RIGHTE     28
C*                    Dallas, Tx 75207                                 *RIGHTE     29
C*                                                                     *RIGHTE     30
C* NEITHER EPRI, ANY MEMBER OF EPRI, NOR ANY PERSON OR  ORGANIZATION   *RIGHTE     31
C* ACTING ON BEHAVE OF THEM:                                           *RIGHTE     32
C*                                                                     *RIGHTE     33
C* 1. MAKE ANY WARRANTY OR REPRESENTATION WHATSOEVER, EXPRESS OR       *RIGHTE     34
C*    IMPLIED, INCLUDING ANY WARRANTY OF MERCHANTABILITY OR FITNESS OR *RIGHTE     35
C*    ANY PURPOSE WITH RESPECT TO THE SOFTWARE OR ITS ASSOCIATED       *RIGHTE     36
C*    DOCUMENTATION; OR                                                *RIGHTE     37
C*                                                                     *RIGHTE     38
C* 2. ASSUMES ANY LIABILITY WHATSOEVER WITH RESPECT TO ANY USE OF THE  *RIGHTE     39
C*    SOFTWARE OR ITS ASSOCIATED DOCUMENTATION OR ANY PORTION THEREOF  *RIGHTE     40
C*    OR WITH RESPECT TO ANY DAMAGES WHICH MAY RESULT FROM SUCH USE.   *RIGHTE     41
C*                                                                     *RIGHTE     42
C* THIS NOTICE MAY NOT BE REMOVED FROM THE SOFTWARE BY ANY USER        *RIGHTE     43
C* THEREOF.                                                            *RIGHTE     44
C*                                                                     *RIGHTE     45
C***********************************************************************RIGHTE     46
      SUBROUTINE INTEB                                                  INTEB       3
CD                                                                      INTEB       4
CD    TO PERFORM INITIALIZATION AND DATA CHECK FOR TRANSIENT EXCITATION INTEB       5
CD    BOOSTER.                                                          INTEB       6
CD                                                                      INTEB       7
CD    THE DATA STRUCTURE AFTER THE INITIALIZATION IS GIVEN BELOW.       INTEB       8
CD                                                                      INTEB       9
CD   6.1 Transient excitation booster type 1                            INTEB      10
CD                                                                      INTEB      11
CD     Booster data                                                     INTEB      12
CD                                                                      INTEB      13
CD     DDAT(JTB+ 1)   = (reserved for future use)                       INTEB      14
CD     DDAT(JTB+ 2)   = K                                               INTEB      15
CD     DDAT(JTB+ 3)   = T1                                              INTEB      16
CD     DDAT(JTB+ 4)   = T2                                              INTEB      17
CD     DDAT(JTB+ 5)   = VTHR                                            INTEB      18
CD                                                                      INTEB      19
CD     Booster states                                                   INTEB      20
CD                                                                      INTEB      21
CD     There are no state variables for transient excitation booster    INTEB      22
CD                                                                      INTEB      23
CD     Booster Y-variables                                              INTEB      24
CD                                                                      INTEB      25
CD     TEB(JYTB+1)    = output of transient excitation booster          INTEB      26
CD                                                                      INTEB      27
      INCLUDE 'PARX.INS'                                                INTEB      28
      INCLUDE 'CNMDAT.INS'                                              INTEB      29
      INCLUDE 'CNB1.INS'                                                INTEB      30
      INCLUDE 'CNB4.INS'                                                INTEB      31
      INCLUDE 'CNSTN.INS'                                               INTEB      32
      INCLUDE 'CNEXC.INS'                                               INTEB      33
      INCLUDE 'CNYVAR.INS'                                              INTEB      34
      INCLUDE 'CNUNIT.INS'                                              INTEB      35
      INCLUDE 'CNMSG.INS'                                               INTEB      36
C                                                                       INTEB      37
C  INPUT TIME CONSTANTS CHECK AND RESET                                 INTEB      38
C                                                                       INTEB      39
      IF(DDAT(JTB+3).LT.TMIN.AND.IDDAT(JTB+3).NE.0)THEN                 INTEB      40
         WRITE(MSG(1),9000) NLF,INAME(KN-2),INAME(KN-1),INAME(KN)       INTEB      41
     *                     ,NDGC(N)                                     INTEB      42
         WRITE(MSG(2),9020) 'T1',DDAT(JTB+3),TMIN                       INTEB      43
         IF(MTFLAG.EQ.0) THEN                                           INTEB      44
            CALL PRTMSG(2)                                              INTEB      45
         ELSE                                                           INTEB      46
            WRITE(MSG(3),9030) 'T1',0.0                                 INTEB      47
            CALL PRTMSG(3)                                              INTEB      48
            DDAT(JTB+3)=0.0                                             INTEB      49
         ENDIF                                                          INTEB      50
      ENDIF                                                             INTEB      51
C                                                                       INTEB      52
      IF(DDAT(JTB+4).LT.TMIN)THEN                                       INTEB      53
         WRITE(MSG(1),9040) NLF,INAME(KN-2),INAME(KN-1),INAME(KN)       INTEB      54
     *                     ,NDGC(N)                                     INTEB      55
         WRITE(MSG(2),9020) 'T2',DDAT(JTB+4),TMIN                       INTEB      56
         CALL PRTMSG(2)                                                 INTEB      57
         MSG(1)='TEB DATA ERROR'                                        INTEB      58
         CALL ASTOP(MSG(1),14)                                          INTEB      59
      ENDIF                                                             INTEB      60
C                                                                       INTEB      61
      IF(IDDAT(JTB+5).EQ.0) DDAT(JTB+5)=1.10                            INTEB      62
C                                                                       INTEB      63
      DDAT(JTB+1)=-10.0                                                 INTEB      64
      DDAT(JTB+7)=0.0                                                   INTEB      65
      DDAT(JTB+6)=DDAT(JTB+2)*DDAT(JTB+4)/(DDAT(JTB+3)-DDAT(JTB+4))     INTEB      66
      TEB(JYTB+1)=0.0                                                   INTEB      67
C                                                                       INTEB      68
      JY=JY+1                                                           INTEB      69
C                                                                       INTEB      70
 9000 FORMAT(' *** WARNING GENERATOR AT BUS:',I6,' STATION: ',3A4       INTEB      71
     *,' GID:',A4)                                                      INTEB      72
 9020 FORMAT(5X,'TEB ',A,'=',F8.6,' IS BELOW THE LIMIT VALUE OF '       INTEB      73
     *,F4.2)                                                            INTEB      74
 9030 FORMAT(5X,A,' HAS BEEN SET TO ',F4.2)                             INTEB      75
 9040 FORMAT(' *** DATA ERROR GENERATOR AT BUS:',I6,' STATION: ',3A4    INTEB      76
     *,' GID:',A4)                                                      INTEB      77
C                                                                       INTEB      78
      RETURN                                                            INTEB      79
      END                                                               INTEB      80
