First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!

Ask Your Question
0

how to find largest mismatch and total mismatch of P and Q after a load flow solution through python?

asked Feb 17 '14

sagar gravatar image

like we find iterations through psspy.iterate()

Is there any function for P and Q mismatch after a load flow?

1 answer

Sort by » oldest newest most voted
0

answered Feb 17 '14

SC gravatar image

psspy.maxmsm()

maxmsm() Use this API to return the complex bus mismatch at the bus with the largest MVA mismatch.

Python syntax:

ierr, ibus, cmpval = maxmsm()

where:


Integer IBUS  Bus number of the bus with the largest MVA mismatch (output).
Real P  Real component (MW) of the bus mismatch (output).
Real Q  Reactive component (Mvar) of the bus mismatch (output).
Complex CMPVAL  Complex bus mismatch (output).
Integer IERR  Is the error code (output):
IERR = 0 No error; 'IBUS', and 'P' and 'Q' or 'CMPVAL' returned.
IERR = 1 No in-service buses found; 'IBUS' of 0, and 'P' and 'Q' of 0.0 or 'CMPVAL' of (0.0,0.0) returned.

psspy.busmsm()

busmsm(ibus=None) Use this API to return complex bus mismatch.

Python syntax:

ierr, cmpval = busmsm(ibus)

where:


Integer IBUS  Bus number (input).
Real P  Real component (MW) of the bus mismatch (output).
Real Q  Reactive component (Mvar) of the bus mismatch (output).
Complex CMPVAL  Complex bus mismatch (output).
Integer IERR  Is the error code (output):
IERR = 0 No error; 'P' and 'Q' or 'CMPVAL' returned.
IERR = 1 Bus not found; 'P' and 'Q' or 'CMPVAL' unchanged.
IERR = 2 Bus type code greater than 4; 'P' and 'Q' or 'CMPVAL' returned set to zero.

psspy.sysmsm()

sysmsm() Use this API to return the total system MVA mismatch.

Python syntax:

mva = sysmsm()

where:


Real MVA  Total system MVA mismatch (output).
link

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.
Want to format code in your answer? Here is a one minute demo on Youtube

Add Answer

[hide preview]

Question Tools

Stats

Asked: Feb 17 '14

Seen: 1,599 times

Last updated: Feb 17 '14