Ask Your Question
0

how to get the bus sequence number

asked 2021-08-26 01:12:55 -0500

Wendy gravatar image

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
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2021-08-26 10:54:13 -0500

perolofl gravatar image

Both CURNT and VOLT are indexed by IB (bus sequence number).

You must calculate IB after ENTRY TEST. As it is now IB is not set before you use it in CURNT(IB) = statement.

Also, normally there is a RETURN before the ENTRY point, i.e. CONEC-part of the subroutine returns before the code for CONET.

edit flag offensive delete link more

Comments

Thank you for your help. I tried, but there is no difference in my result. Would you mind giving me further help? Can I send my model to your email? Thanks!

Wendy gravatar imageWendy ( 2021-08-29 00:59:24 -0500 )edit

Give me your email.

perolofl gravatar imageperolofl ( 2021-08-30 03:30:14 -0500 )edit

My email is 948471520@qq.com. Really appreciate it!

Wendy gravatar imageWendy ( 2021-08-30 04:29:16 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Question Tools

1 follower

Stats

Asked: 2021-08-26 01:12:55 -0500

Seen: 392 times

Last updated: Aug 26 '21