if LoadScenario == "SummerPeakLoad": file_name = "SummerHi-20171219-153047-34-SystemNormal" if LoadScenario == "SummerLowLoad": file_name = "SummerLowNormal-20161225-040047" if LoadScenario == "SimplifiedSystem": file_name = "WISF_ADD" # start simulation OutputFilePath = ProgramPath + str(fault_type) + "SimulationOutput4.outx" TimeShift = 0 psspy.case(GridInfoPath + file_name + ".sav") # psspy.rstr(GridInfoPath+file_name+".snp") psspy.resq(GridInfoPath + "/" + file_name + ".seq") psspy.dyre_new([1, 1, 1, 1], GridInfoPath + "/" + file_name + ".dyr", "", "", "") psspy.addmodellibrary(HuaweiModelPath + 'HWS2000_psse34.dll') psspy.addmodellibrary(HuaweiModelPath + 'MOD_GPM_PPC_V13_34.dll') psspy.addmodellibrary(HuaweiModelPath + 'MOD_GPM_SB_V7.dll') psspy.dynamics_solution_param_2([_i, _i, _i, _i, _i, _i, _i, _i], [0.300, _f, 0.001, 0.004, _f, _f, _f, _f]) psspy.machine_data_2( 500, r"""1""", [_i, _i, _i, _i, _i, _i], [90, _f, _f, _f, 96.8, _f, _f, _f, _f, _f, _f, _f, _f, _f, _f, _f, _f]) psspy.fnsl([0, 0, 0, 1, 1, 1, 99, 0]) psspy.bus_frequency_channel([1, 1000], r"""System frequency""") psspy.voltage_channel([2, -1, -1, 500], r"""Inverter Voltage Mag.""") psspy.voltage_channel([3, -1, -1, 800], r"""WISF POC Voltage Mag.""") psspy.branch_p_and_q_channel([4, -1, -1, 800, 900], r"""1""", [r"""P Injection""", r"""Q Injection"""]) ierr = psspy.machine_array_channel([6, 2, 500], r"""1""",
_i = psspy.getdefaultint() _f = psspy.getdefaultreal() _s = psspy.getdefaultchar() redirect.psse2py() psspy.psseinit(50000) dVref = 0.05 POC_VCtrl_Tgt = 1.00 CON_PPCVref = 10 VAR_PPCVini = 1 FileName = f_list[case[test - 1] - 1] psspy.case(CasePath + FileName) psspy.resq(CasePath + "Tamworth_SMIB.seq") psspy.addmodellibrary(CasePath + 'SMASC_E161_SMAPPC_E130_342_IVF150.dll') psspy.dyre_new([1, 1, 1, 1], CasePath + "Tamworth_SMIB_E161_E130.dyr", '', '', '') OutputFilePath = FigurePath + '05. PoC Vref Step Test' + "\\" + 'Test' + str( test + 18) + '_' + FileName + '_sFac' + str(acceleration) + '_dT' + str( integration_step) + '_PoC Vref Step Test.out' # Setup Dynamic Simulation parameters psspy.dynamics_solution_param_2( [n_iteration, _i, _i, _i, _i, _i, _i, _i], [acceleration, tolerance, integration_step, _f, _f, _f, _f, _f]) psspy.fdns([0, 0, 1, 1, 0, 0, 99, 0]) # convert load , do not change psspy.cong(0)
file_name = "NEOEN Western Downs Solar Farm_C3WV_mod" ######################################### Read Input List ####################################### # Active Power Setpoint ActivePowerSetpoint = range(0, 101, 50) ReactivePowerSetpoint = [-40, 40] vref = numpy.arange(0.70, 1.3, 0.05) S = 100 # Initialize psspy.read(0, GridInfoPath + LoadScenario + "/" + file_name + ".raw") psspy.resq(GridInfoPath + LoadScenario + "/" + file_name + ".seq") psspy.dyre_new([1, 1, 1, 1], GridInfoPath + LoadScenario + "/" + file_name + ".dyr", "", "", "") psspy.addmodellibrary(HuaweiModelPath + 'HWH9001_342.dll') psspy.addmodellibrary(HuaweiModelPath + 'PPC_PSSE_ver_13_08_34_2_10082018_AUS.dll') psspy.addmodellibrary(HuaweiModelPath + 'MOD_GPM_SB_V7.dll') psspy.dynamics_solution_param_2([_i, _i, _i, _i, _i, _i, _i, _i], [1.000, _f, 0.001, 0.004, _f, _f, _f, _f]) for i in range(0, len(ActivePowerSetpoint)): for j in range(0, len(ReactivePowerSetpoint)): for k in range(0, len(vref)): # re - initialize psspy.read(0, GridInfoPath + LoadScenario + "/" + file_name + ".raw") psspy.resq(GridInfoPath + LoadScenario + "/" + file_name + ".seq") psspy.dyre_new([1, 1, 1, 1], GridInfoPath + LoadScenario + "/" + file_name + ".dyr", "", "", "")
FigurePath = "C:/NEOEN/R_Results/" if LoadScenario == "SummerPeakLoad": file_name = "SummerHi-20171219-153047-34-SystemNormal_all_bus_DDSF" if LoadScenario == "SummerLowLoad": file_name = "SummerLo-20171226-043047-34-SystemNormal_all_bus_DDSF" if LoadScenario == "SimplifiedSystem": file_name = "NEOEN Western Downs Solar Farm_C3WV_mod" # Initialize psspy.read(0, GridInfoPath + LoadScenario + "/" + file_name + ".raw") psspy.resq(GridInfoPath + LoadScenario + "/" + file_name + ".seq") psspy.dyre_new([1, 1, 1, 1], GridInfoPath + LoadScenario + "/" + file_name + ".dyr", "", "", "") psspy.addmodellibrary(GridInfoPath + 'dsusr.dll') psspy.addmodellibrary(HuaweiModelPath + 'HWH9001_342.dll') psspy.addmodellibrary(HuaweiModelPath + 'PPC_PSSE_ver_13_08_34_2_10082018_AUS.dll') psspy.addmodellibrary(HuaweiModelPath + 'MOD_GPM_SB_V7.dll') psspy.addmodellibrary(GridInfoPath + 'GEWTG34.dll') psspy.addmodellibrary(GridInfoPath + 'SMAPPC_B111_34_IVF111.dll') psspy.addmodellibrary(GridInfoPath + 'SMASC_C135_34_IVF111.dll') [ierr, var_ppc_conp] = psspy.mdlind(101, '1', 'EXC', 'CON') [ierr, var_ppc_setp] = psspy.mdlind(101, '1', 'EXC', 'VAR') [ierr, var_ppc_mode] = psspy.mdlind(101, '1', 'EXC', 'ICON') [ierr, var_inv_con] = psspy.mdlind(101, '1', 'GEN', 'CON') [ierr, var_inv_var] = psspy.mdlind(101, '1', 'GEN', 'VAR') psspy.machine_data_2(101, r"""1""", [_i, _i, _i, _i, _i, _i], [ ActivePowerSetpoint * S, _f, _f, _f, 120, _f, _f, _f, _f, _f, _f, _f, _f, _f, _f, _f, _f