CFPRIME EXSATF                                                          EXSATF      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 EXSATF                                                 EXSATF      3
CD                                                                      EXSATF      4
CD    TO CONVERT THE EXCITER SATURATION DATA FROM SE(VSAT) FORM TO      EXSATF      5
CD    AEX, BEX FORM.                                                    EXSATF      6
CD                                                                      EXSATF      7
      INCLUDE 'PARX.INS'                                                EXSATF      8
      INCLUDE 'CNMDAT.INS'                                              EXSATF      9
      INCLUDE 'CNUNIT.INS'                                              EXSATF     10
      INCLUDE 'CNEXC.INS'                                               EXSATF     11
      INCLUDE 'CNSTN.INS'                                               EXSATF     12
      INCLUDE 'CNB1.INS'                                                EXSATF     13
      INCLUDE 'CNMSG.INS'                                               EXSATF     14
      INCLUDE 'CNFLAG.INS'                                              EXSATF     15
C                                                                       EXSATF     16
*IF DEBUG                                                               EXSATF     17
      LDEB=(JDEB(18).NE.0)                                              EXSATF     18
*ENDIF                                                                  EXSATF     19
C                                                                       EXSATF     20
C  CONVERSION OF EXTR SATURATION FROM SE(VSAT) TO AEX,BEX               EXSATF     21
C  VSAT=0 . . . NO CONVERSION                                           EXSATF     22
C                                                                       EXSATF     23
      IF(IDDAT(JE+6).EQ.0.OR.IDDAT(JE+7).EQ.0)THEN                      EXSATF     24
         AEX=0.0                                                        EXSATF     25
         BEX=1.0                                                        EXSATF     26
         WRITE(MSG(1),300)NLF,INAME(KN-2),INAME(KN-1),INAME(KN),NDGC(N) EXSATF     27
         WRITE(MSG(2),400)                                              EXSATF     28
         WRITE(MSG(3),600)                                              EXSATF     29
         CALL PRTMSG(3)                                                 EXSATF     30
      ELSE                                                              EXSATF     31
         SERAT=(DDAT(JE+6)/DDAT(JE+7))/0.75                             EXSATF     32
         BEX=LOG(SERAT)/(0.25*DDAT(JE+8))                               EXSATF     33
         AEX=(DDAT(JE+6)*DDAT(JE+8))/EXP(BEX*DDAT(JE+8))                EXSATF     34
      ENDIF                                                             EXSATF     35
      DDAT(JE+6)=AEX                                                    EXSATF     36
      DDAT(JE+7)=BEX                                                    EXSATF     37
      DDAT(JE+8)=0.0                                                    EXSATF     38
C      WRITE(IU6,100) AEX,BEX                                           EXSATF     39
C                                                                       EXSATF     40
      RETURN                                                            EXSATF     41
C                                                                       EXSATF     42
      ENTRY CALKE (SE0)                                                 EXSATF     43
CD                                                                      EXSATF     44
CD    TO COMPUTE EQUIVALENT KE AND MODIFIED AEX FOR EXCITER TYPE 2.     EXSATF     45
CD                                                                      EXSATF     46
      SE=DDAT(JE+6)*EXP(DDAT(JE+7)*EFDN)/EFDN                           EXSATF     47
      RX=1./(SE+1.)                                                     EXSATF     48
      DDAT(JE+4)=RX-1.                                                  EXSATF     49
      DDAT(JE+6)=RX*DDAT(JE+6)                                          EXSATF     50
      SE0=RX*SE                                                         EXSATF     51
      IF (LDEB) WRITE (IUD6,200) NLF,RX,DDAT(JE+4),DDAT(JE+6),DDAT(JE+7)EXSATF     52
      RETURN                                                            EXSATF     53
C                                                                       EXSATF     54
      ENTRY CALKE1 (SE1)                                                EXSATF     55
CD                                                                      EXSATF     56
CD    TO COMPUTE KE FOR EXCITER TYPES 1 AND 9 IF IT IS NOT SPECIFIED.   EXSATF     57
CD                                                                      EXSATF     58
      SE1=DDAT(JE+6)*EXP(DDAT(JE+7)*EFDN)/EFDN                          EXSATF     59
      DDAT(JE+4)=-SE1                                                   EXSATF     60
C      WRITE (IU6,500) DDAT(JE+4)                                       EXSATF     61
      RETURN                                                            EXSATF     62
 200  FORMAT(5X,I5,3X,4G14.6)                                           EXSATF     63
 300  FORMAT(' *** WARNING GENERATOR AT BUS: ',I5,' STATION: ',3A4      EXSATF     64
     *,' GID:',A4)                                                      EXSATF     65
 400  FORMAT(5X,'AT LEAST ONE OF THE EXCITER SATURATION DATA IS ZERO.') EXSATF     66
 600  FORMAT(5X,'NO SATURATION IS NOW PRESENTED.')                      EXSATF     67
      END                                                               EXSATF     68
