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

Ask Your Question
1

About correctly getting bus voltage after running ACCC.

asked Sep 2 '14

ypwang gravatar image

Hi everyone,

I am doing contingency analysis using ACCC. After running ACCC, I would like to check the voltage magnitude of each monitored bus. My code goes as below:

# perform ACCC without dispatch model for branch contingency
accc_ierr = psspy.accc_with_dsp_2(0.6, [0,0,0,1,2,1,0,0,0,0], _s, conFileName1+'.dfx', conFileName1+'.acc', _o, _o)

# fetch summary of ACCC solution for debug purpose
 smry = pssarrays.accc_summary(conFileName1+'.acc')        

 for lbl in smry.colabel:

        # for each contingency case
        soln = pssarrays.accc_solution(accfile=conFileName1+'.acc', colabel=lbl, stype='con', busmsm=0.6, sysmsm =5.0)
        # skip some unregular contingencies                    
        if (soln == None or soln.ierr != 0):
            continue

        # if solution converged, continue  
        if (soln.cnvflag):

            # check voltage violations at buses
            sum_UnderVoltVio = 0
            numBuses_UnderVoltVio = 0
            sum_OverVoltVio = 0
            numBuses_OverVoltVio = 0
            for k in range(smry.acccsize.nmvbus):   
                busVolt = soln.volts[k]                            
                if(busVolt < volt_lb):                        
                    sum_UnderVoltVio = sum_UnderVoltVio + (volt_lb - busVolt)
                    numBuses_UnderVoltVio = numBuses_UnderVoltVio + 1

                elif(busVolt > volt_ub):
                    #print "busVolt", busVolt
                    sum_OverVoltVio = sum_OverVoltVio + (busVolt - volt_ub)
                    numBuses_OverVoltVio = numBuses_OverVoltVio + 1

So basically, I know all voltages of all monitored buses are stored in soln.volts array. And I am sure that smry.acccsize.nmvbus is the number of voltage monitored buses. So I was assuming that size of soln.volts array should be equal to smry.acccsize.nmvbus. But this is not the case, the size of soln.volts is actually twice as big as smry.acccsize.nmvbus (see statistics below). And if I don't remember wrong, the values in soln.volts just got repeated twice, which means, the first half is exactly the same the second half.

smry.acccsize.nmvbus= 6244 # is the number of monitored buses.

smry.acccsize.nmvbusrec= 12488 # is the number of voltage monitored bus records

len(soln.volts)= 12488

Notice that smry.acccsize.nmvrec= 2 # is the number of voltage monitored records

I don't why PSSE does this. Maybe it is a bug, but I wanted to make sure I am fetching the correct voltage for each monitored bus. Can anyone help explain why?

Thanks very much!

1 answer

Sort by » oldest newest most voted
0

answered Sep 3 '14

Eli Pack gravatar image

The size of soln.volts array should be equal to smry.acccsize.nmvbusrec. It looks to me like nmvbusrec is twice the size of nmvbus because you have two voltage monitor records (nmvrec=2). I expect this will link back to your .MON file.

link

Comments

Hi Eli, thanks a lot for your answer. Like you said, I do have two volt monitoring commands in my .mon file. One is for volt range and one is for volt deviation. I believe those two are used for automatic violation report generation. What I don't understand is that why two voltage for one bus.

ypwang gravatar imageypwang (Sep 3 '14)

You're asking PSSE to check for 2 things: voltages outside a range, and voltages that change by a specific amount. PSSE takes a methodical approach where it does them in turn. If it were smarter, it would probably recognise the duplication and only report on each bus. Just ignore the duplicates.

Eli Pack gravatar imageEli Pack (Sep 3 '14)

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

1 follower

Stats

Asked: Sep 2 '14

Seen: 1,051 times

Last updated: Sep 02 '14