Ask Your Question
0

PSSE Blown Up Case or Iteriation Limit Exceeded

asked 2017-09-20 09:19:15 -0500

anonymous user

Anonymous

updated 2017-09-20 09:36:29 -0500

I'm am trying to run an automation program I made on PSSE. I am pretty much accessing data from an excel sheet and transferring it to PSSE. The code is shown below. When running this code, I either get a blown up case or an iteration limit exceeded message. Are there any ways to fix this, change settings of program, or any solving method? Any help would be appreciated. The function I am using is psspy.fdns, I need to use fixed slope decoupled Newton Raphson method. And it is shown many times in the code.

from __future__ import print_function
import os.path
import win32com.client

#---------------------------------------------------------------------------------------------------------------------
xlApp = win32com.client.DispatchEx('Excel.Application') # Running Excel
xlsPath = os.path.expanduser('I:\TPGeneral\Ten Year Load Forecasts 2017-2026.xlsm')# Reading xlsm file
wb = xlApp.Workbooks.Open(Filename=xlsPath) # Opening file
xlApp.Run('csvfile4')# Running macro---- csvfile2 is the macro name. It is under the "csv" module in the VBA editor
wb.Save()
xlApp.Quit()
#---------------------------------------------------------------------------------------------------------------------
import os, sys
import psspy
import redirect
import csv
psspy.throwPsseExceptions = True
from Tkinter import *    # File Dialog
import tkFileDialog
import tkSimpleDialog
import tkMessageBox
import Tkinter as tk

LOAD_GEN_DATAFILE = 'I:\TPGeneral\Load_Forecasts.csv' # CSV File to Read
#-------------------------------------------------------------------------------
# read the entire CSV into Python.
# CSV has columns starting with Year,busnum,busname,scaled_power,tla,location
data = list(csv.reader(open(LOAD_GEN_DATAFILE)))
mydict = {}
for row in data:
    Year,busnum,busname,scaled_power,tla,data_location,empty,year_link,from_,to,digit,name2,tla_2,min_value,max_value = row[0:15]


    #If this is a year not seen before, add it to the dictionary
    if Year not in mydict:
        mydict[Year] = {}

    busses_in_year = mydict[Year]
    if data_location not in busses_in_year:
         busses_in_year[data_location] = []


    #Add the bus to the list of busses that stop at this location
    busses_in_year[data_location].append((busnum,busname,scaled_power))
#-------------------------------------------------------------------------------



#-------------------------------------------------------------------------------------------------------------------------------------
#User Input Statement
year = raw_input("Please Select Year of Study: ")
print("\n")
location=raw_input(" \n The list above show the TLA Pockets as well as the ID numbers assigned to them ()\n\n Please enter the ID #: ")
print("\n")
Year=year
data_location=location
#---------------------------------------------------------------------------------------------------------------------------------------

#-------------------------------------------------LOAD FORECASTS--------------------------------------------------------------------
outputs=[]
if Year in mydict and data_location in mydict[Year]:  
    busses_in_year = mydict[Year]
    #print("Here are all the busses at that location for that year and the new LOAD TOTAL: ")
    #print("\n")

    #Busnum, busname,scaled_power read from excel sheet matching year and location

    for busnum,busname,scaled_power in busses_in_year[data_location]:
        scaled_power= float(scaled_power)
        busnum = int(busnum)
        output='Bus #: {}\t Area Station: {}\t New Load Total: {} MW\t'
        formatted = output.format(busnum, busname, scaled_power)
        outputs.append(formatted)
        psspy.bsys(1,0,[0.0,0.0],0,[],1,[busnum],0,[],0,[])
        psspy.scal_2(1,0,1,[0,0,0,0,0],[0.0,0.0,0.0,0.0,0.0,0.0,0.0])
        psspy.scal_2(0,1,2,[0,1,0,1,0],[scaled_power,0.0,0,-.0,0.0,-.0,0])
        #psspy.fdns([0,0,0,0,0,0,0,0])
        #psspy.fdns([1,0,0,0,0,0,0,0])
        #psspy.fdns([1,0,1,0,0,0,0,0 ...
(more)
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2017-09-20 21:11:14 -0500

jconto gravatar image

updated 2017-09-20 21:12:50 -0500

It seems that the code updates the total load (with forecasting values). This process creates an unbalanced between generation & load, leading to progressive non-convergence since by default, the swing generator will take the delta of the MW unbalance, getting 'stressed' on higher loading. It is better to re-dispatch a group of generators after each increase in load but before a load flow solution. The re-dispatch will aim to keep all generators within their generating capabilities.

As a test, try to reach each new system loading incrementally, not 'at once'

edit flag offensive delete link more

Comments

Any ideas on how to do that? This was great advice, I am not sure on how to do that.

mikerosz94 gravatar imagemikerosz94 ( 2017-09-21 07:58:00 -0500 )edit

When I am working with this kind of set-up (say a generation entry of 1000 MW), I gradually re-dispatch the other generators scaling down incrementally for instance, in steps of 100 MW. For every MW step change, I solve the power flow.

lmcqueen gravatar imagelmcqueen ( 2017-09-25 07:27:14 -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: 2017-09-20 09:19:15 -0500

Seen: 1,363 times

Last updated: Sep 20 '17