Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

how to get the bus sequence number

I am writing a generator model and use CURNT(IB). Following is my UDM. And in .dyr, I write

4,'USRMDL',1,'MEST',101,1,0,0,0,0,/

1,'GENCLS',1,0.0,0.0,/

But when I use CURNT(IB) or CURNT(IBUS), the dynamic simulation in PSSE failed. When I use CURNT(4), the simulation can run, but the result(for example active power and reactive power in bus) doesn't match with what I set.

How to get the bus sequence number and is there something wrong with my UDM? Thanks!

 SUBROUTINE MEST (MC, ISLOT)
 INCLUDE 'COMON4.INS'   
 INTEGER MC,ISLOT,IB,IBUS
 COMPLEX PQ
 INTRINSIC ABS,CONJG

 IF(MODE .EQ.8)THEN
 RETURN 
 END IF

 IB=NUMTRM(MC)
 IF(IB.LE.0)RETURN
 IBUS=NUMBUS(ABS(IB))

 ENTRY TEST(MC,ISLOT)

    IF(MODE.EQ.1)THEN
       RETURN 
     END IF

    IF(MODE.EQ.3)THEN
       PQ=(0.05,0.024)
       PELEC(MC)=0.05
       QELEC(MC)=0.024
       CURNT(IBUS)=CURNT(IBUS)+CONJG(PQ/VOLT(IBUS))
     RETURN
    END IF 

   RETURN
RETURN     END