Example #1
0
psspy.cong(0)
psspy.bus_frequency_channel([1,1000],r"""System frequency""")
ierr=psspy.machine_array_channel([2,4,500],r"""1""",r"""Inverter Terminal Voltage""")
ierr=psspy.voltage_channel([3,-1,-1,800],r"""WISF PoC Voltage""")
psspy.branch_p_and_q_channel([4,-1,-1,800,900],r"""1""",[r"""P Injection""",r"""Q Injection"""])
psspy.branch_p_and_q_channel([6,-1,-1,500,600],r"""1""",[r"""P Injection""",r"""Q Injection"""])
# ierr=psspy.machine_array_channel([6,2,500],r"""1""",r"""Pelec Inverter""")
# ierr=psspy.machine_array_channel([7,3,500],r"""1""",r"""Qelec Inverter""")
[ierr, var_ppc_conp] = psspy.mdlind(500, '1', 'EXC', 'CON')
[ierr, var_ppc_setp] = psspy.mdlind(500, '1', 'EXC', 'VAR')
[ierr, var_ppc_mode] = psspy.mdlind(500, '1', 'EXC', 'ICON')
[ierr, var_inv1_con] = psspy.mdlind(500, '1', 'GEN', 'CON')
[ierr, var_inv1_var]=  psspy.mdlind(500,'1','GEN','VAR')
[ierr, var_inv1_mod]=  psspy.mdlind(500,'1','GEN','ICON')

ierr=psspy.var_channel([8,var_ppc_setp+68],"Voltage Setpoint")
ierr=psspy.var_channel([9,var_ppc_setp+10],"Active Power Setpoint")

# psspy.change_con(var_ppc_conp+1,0.05)
# psspy.change_con(var_ppc_conp+2,0.40)

# psspy.change_con(var_ppc_conp+9, 1.0)
# psspy.change_con(var_ppc_conp+4, 0.6)
# psspy.change_con(var_ppc_conp+5,-0.6)
# psspy.change_con(var_ppc_conp+22,0.001)
# psspy.change_con(var_ppc_conp+23,0.50)
#
# psspy.change_con(var_ppc_conp+25,0.80)
# psspy.change_con(var_ppc_conp+26,1.20)
#
# psspy.change_con(var_ppc_conp+1,0.05)
Example #2
0
        [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)
    psspy.conl(0, 1, 1, [0, 0], [100.0, 0.0, 0.0, 100.0])
    psspy.conl(0, 1, 2, [0, 0], [100.0, 0.0, 0.0, 100.0])
    psspy.conl(0, 1, 3, [0, 0], [100.0, 0.0, 0.0, 100.0])
    psspy.ordr(0)  # ! Order the matrix: ORDR
    psspy.fact()  # ! Factorize the matrix: FACT
    psspy.tysl(0)  # ! TYSL

    psspy.bus_frequency_channel([1, 969], r"""System frequency""")
    psspy.voltage_channel([2, -1, -1, 969], r"""IB_Voltage""")
    psspy.voltage_channel([3, -1, -1, 100], r"""UUT_Voltage""")
    psspy.voltage_channel([4, -1, -1, 106], r"""POC_Voltage""")
    psspy.machine_array_channel([5, 2, 100], r"""1""", r"""UUT_Pelec""")
    psspy.machine_array_channel([6, 3, 100], r"""1""", r"""UUT_Qelec""")
    psspy.branch_p_and_q_channel([7, -1, -1, 105, 106], r"""1""",
                                 [r"""POC_Flow""", ""])
    psspy.machine_array_channel([9, 9, 100], r"""1""", r"""UUT_IDcmd""")
    psspy.machine_array_channel([10, 12, 100], r"""1""", r"""UUT_IQcmd""")
    psspy.machine_array_channel([11, 8, 100], r"""1""", r"""PPC_Pcmd""")
    psspy.machine_array_channel([12, 5, 100], r"""1""", r"""PPC_Qcmd""")
    [ierr, var_sc_setp] = psspy.mdlind(100, '1', 'GEN', 'VAR')
    psspy.var_channel([13, var_sc_setp + 115], "LVRT Flag")
    psspy.var_channel([14, var_sc_setp + 116], "HVRT Flag")

    psspy.strt_2([0, 0], OutputFilePath)
    psspy.run(0, 80.0, 1000, 5, 5)
Example #3
0
    psspy.change_var(t_var, 0)

[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')
[ierr, var_inv_stt] = psspy.mdlind(101, '1', 'GEN', 'STATE')
psspy.bus_frequency_channel([1, 400], r"""System frequency""")
psspy.voltage_channel([2, -1, -1, 101], r"""Inverter Voltage Mag.""")
psspy.voltage_channel([3, -1, -1, 400], r"""WD SF POC Voltage Mag.""")
psspy.branch_p_and_q_channel([4, -1, -1, 400, 46660], r"""1""",
                             [r"""P Injection""", r"""Q Injection"""])
psspy.branch_p_and_q_channel([7, -1, -1, 101, 111], r"""1""",
                             [r"""P Injection""", r"""Q Injection"""])
psspy.var_channel([9, var_ppc_setp + 68], r"""Voltage Setpoint""")

psspy.cong(0)
psspy.conl(0, 1, 1, [0, 0], [0.0, 0.0, 0.1, 0.0])
psspy.conl(0, 1, 2, [0, 0], [0.0, 0.0, 0.1, 0.0])
psspy.conl(0, 1, 3, [0, 0], [0.0, 0.0, 0.1, 0.0])
psspy.ordr(1)
psspy.fact()
psspy.tysl(1)
psspy.change_plmod_con(600, r"""1""", r"""GENCLS""", 1, 8)
#psspy.change_plmod_icon(101,r"""1""",r"""GPMPPC""",4,0)
# start simulation
psspy.strt_2([0, 0], OutputFilePath)
psspy.run(0, 1, 1000, 1, 0)
psspy.change_var(var_ppc_setp + 68, 1.043)
# psspy.change_plmod_var(101,r"""1""",r"""GPMPPC""",11, 432)
Example #4
0
# psspy.change_plmod_icon(101,r"""1""",r"""GPMPPC""",4,3)
# psspy.change_plmod_icon(101,r"""1""",r"""HWS2000""",1,2)

psspy.bus_frequency_channel([1,400],r"""System frequency""")
psspy.voltage_channel([2,-1,-1,101],r"""Inverter Voltage Mag.""")
psspy.voltage_channel([3,-1,-1,400],r"""NEOEN SF POC Voltage Mag.""")
psspy.branch_p_and_q_channel([4,-1,-1,400,46660],r"""1""",[r"""P Injection""",r"""Q Injection"""])
ierr=psspy.machine_array_channel([7,2,101],r"""1""",r"""Pelec 101""")
ierr=psspy.machine_array_channel([8,3,101],r"""1""",r"""Qelec 101""")
ierr=psspy.machine_array_channel([9,2,102],r"""1""",r"""Pelec 102""")
ierr=psspy.machine_array_channel([10,3,102],r"""1""",r"""Qelec 102""")
ierr=psspy.machine_array_channel([11,2,103],r"""1""",r"""Pelec 103""")
ierr=psspy.machine_array_channel([12,3,103],r"""1""",r"""Qelec 103""")
ierr=psspy.machine_array_channel([13,2,104],r"""1""",r"""Pelec 104""")
ierr=psspy.machine_array_channel([14,3,104],r"""1""",r"""Qelec 104""")
psspy.var_channel([15,var_ppc_setp+10],r"""Active Power Setpoint""")


# convert load , do not change
psspy.cong(0)
psspy.bsys(0,0,[0.0, 500.],1,[7],0,[],0,[],0,[])
psspy.bsys(0,0,[0.0, 500.],1,[7],0,[],0,[],0,[])
psspy.conl(0,0,1,[0,0],[ 91.27, 19.36,-126.88, 188.43])
psspy.conl(0,0,2,[0,0],[ 91.27, 19.36,-126.88, 188.43])
psspy.bsys(1,0,[0.0,0.0],0,[],6,[37600,37601,37602,37580,37584,38588],0,[],0,[])
psspy.conl(1,0,2,[0,0],[ 52.75, 58.13, 5.97, 95.52])
psspy.bsys(1,0,[0.0,0.0],0,[],1,[21790],0,[],0,[])
psspy.conl(1,0,2,[0,0],[ 86.63, 25.19, -378.97, 347.97])
psspy.bsys(1,0,[0.0,0.0],0,[],1,[45082],0,[],0,[])
psspy.conl(1,0,2,[0,0],[ 51.36, 59.32,-228.04, 254.01])
psspy.bsys(1,0,[0.0,0.0],0,[],9,[40320,40340,40350,40970,40980,40990,41050,41071,41120],0,[],0,[])