Ejemplo n.º 1
0
    dynopt = {}
    dynopt['h'] = 0.001  # step length (s)
    dynopt['t_sim'] = 200.0  # simulation time (s)
    dynopt[
        'max_err'] = 1e-6  # Maximum error in network iteration (voltage mismatches)
    dynopt['max_iter'] = 25  # Maximum number of network iterations
    dynopt['verbose'] = False  # option for verbose messages
    dynopt['fn'] = 60  # Nominal system frequency (Hz)

    # Integrator option
    dynopt['iopt'] = 'mod_euler'
    #dynopt['iopt'] = 'runge_kutta'

    # Create dynamic model objects
    # oCtrl = controller('avr.dyn', dynopt)
    G1 = ext_grid('GEN1', 0, 0.0608, 23.64, dynopt)
    G2 = ext_grid('GEN2', 1, 0.1198, 6.01, dynopt)
    # G3 = ext_grid('GEN3', 2, 0.1813, 3.01, dynopt)
    # B1 = sym_order6b('B1.mach', dynopt)
    # B2 = sym_order6b('B2.mach', dynopt)
    # B3 = sym_order6b('B3.mach', dynopt)
    # B4 = sym_order6b('B4.mach', dynopt)

    # Create dictionary of elements
    elements = {}
    # elements[oCtrl.id] = oCtrl
    elements[G1.id] = G1
    elements[G2.id] = G2
    # elements[G3.id] = G3
    # elements[B1.id] = B1
    # elements[B2.id] = B2
Ejemplo n.º 2
0
    dynopt['t_sim'] = 15  # simulation time (s)
    dynopt[
        'max_err'] = 0.0001  # Maximum error in network iteration (voltage mismatches)
    dynopt['max_iter'] = 25  # Maximum number of network iterations
    dynopt['verbose'] = False  # option for verbose messages
    dynopt['fn'] = 50  # Nominal system frequency (Hz)

    # Integrator option
    #dynopt['iopt'] = 'mod_euler'
    dynopt['iopt'] = 'runge_kutta'

    # Create dynamic model objects
    oCtrl = controller('smib.dyn', dynopt)
    oMach = sym_order6a('smib_round.mach', dynopt)
    #oMach = sym_order4('smib_round.mach', iopt)
    oGrid = ext_grid('GRID1', 0, 0.1, 99999, dynopt)

    # Create dictionary of elements
    # Hard-coded placeholder (to be replaced by a more generic loop)
    elements = {}
    elements[oCtrl.id] = oCtrl
    elements[oMach.id] = oMach
    elements[oGrid.id] = oGrid

    # Create event stack
    oEvents = events('smib_events.evnt')

    # Create recorder object
    oRecord = recorder('smib_recorder.rcd')

    # Run simulation
Ejemplo n.º 3
0
 dynopt['h'] = 0.01                # step length (s)
 dynopt['t_sim'] = 15              # simulation time (s)
 dynopt['max_err'] = 0.0001        # Maximum error in network iteration (voltage mismatches)
 dynopt['max_iter'] = 25           # Maximum number of network iterations
 dynopt['verbose'] = False         # option for verbose messages
 dynopt['fn'] = 50                 # Nominal system frequency (Hz)
 
 # Integrator option
 #dynopt['iopt'] = 'mod_euler'
 dynopt['iopt'] = 'runge_kutta'
 
 # Create dynamic model objects
 oCtrl = controller('smib.dyn', dynopt)
 oMach = sym_order6a('smib_round.mach', dynopt)
 #oMach = sym_order4('smib_round.mach', iopt) 
 oGrid = ext_grid('GRID1', 0, 0.1, 99999, dynopt)
 
 # Create dictionary of elements
 # Hard-coded placeholder (to be replaced by a more generic loop)
 elements = {}
 elements[oCtrl.id] = oCtrl
 elements[oMach.id] = oMach
 elements[oGrid.id] = oGrid
 
 # Create event stack
 oEvents = events('smib_events.evnt')
 
 # Create recorder object
 oRecord = recorder('smib_recorder.rcd')
 
 # Run simulation
Ejemplo n.º 4
0
    dynopt['max_iter'] = 60  # Maximum number of network iterations
    dynopt['verbose'] = False  # option for verbose messages
    dynopt['fn'] = 60  # Nominal system frequency (Hz)
    dynopt[
        'speed_volt'] = True  # Speed-voltage term option (for current injection calculation)

    # Integrator option
    #dynopt['iopt'] = 'mod_euler'
    dynopt['iopt'] = 'runge_kutta'

    # Create dictionary of elements
    elements = {}

    for i in range(n_gen):
        #G_i = sym_order6b('Generator'+ str(i) +'.mach', dynopt)
        G_i = ext_grid('GEN' + str(i), i, 0.1198, H[i], dynopt)
        elements[G_i.id] = G_i

        #Ctrl_i = controller('volt_ctrl'+ str(i) +'.dyn', dynopt)
        #elements[Ctrl_i.id] = Ctrl_i

        #sec_ctrl_i = controller('sec_volt_ctrl'+ str(i) +'.dyn', dynopt)
        #elements[sec_ctrl_i.id] = sec_ctrl_i

        freq_ctrl_i = controller('freq_ctrl' + str(i) + '.dyn', dynopt)
        elements[freq_ctrl_i.id] = freq_ctrl_i
    #i=0
    #Ctrl_i = controller('ctrl'+ str(i) +'.dyn', dynopt)
    #elements[Ctrl_i.id] = Ctrl_i

    sync1 = controller('sync.dyn', dynopt)
Ejemplo n.º 5
0
 
 # Program options
 dynopt = {}
 dynopt['h'] = 0.001               # step length (s)
 dynopt['t_sim'] = 2.0               # simulation time (s)
 dynopt['max_err'] = 1e-6          # Maximum error in network iteration (voltage mismatches)
 dynopt['max_iter'] = 25           # Maximum number of network iterations
 dynopt['verbose'] = False         # option for verbose messages
 dynopt['fn'] = 60                 # Nominal system frequency (Hz)
 
 # Integrator option
 dynopt['iopt'] = 'mod_euler'
 #dynopt['iopt'] = 'runge_kutta'
 
 # Create dynamic model objects
 G1 = ext_grid('GEN1', 0, 0.0608, 23.64, dynopt)
 G2 = ext_grid('GEN2', 1, 0.1198, 6.01, dynopt)
 G3 = ext_grid('GEN3', 2, 0.1813, 3.01, dynopt)
 
 # Create dictionary of elements
 elements = {}
 elements[G1.id] = G1
 elements[G2.id] = G2
 elements[G3.id] = G3
 
 # Create event stack
 oEvents = events('events.evnt')
 
 # Create recorder object
 oRecord = recorder('recorder.rcd')
 
Ejemplo n.º 6
0
    # Program options
    dynopt = {}
    dynopt['h'] = 0.001  # step length (s)
    dynopt['t_sim'] = 2.0  # simulation time (s)
    dynopt[
        'max_err'] = 1e-6  # Maximum error in network iteration (voltage mismatches)
    dynopt['max_iter'] = 25  # Maximum number of network iterations
    dynopt['verbose'] = False  # option for verbose messages
    dynopt['fn'] = 60  # Nominal system frequency (Hz)

    # Integrator option
    dynopt['iopt'] = 'mod_euler'
    #dynopt['iopt'] = 'runge_kutta'

    # Create dynamic model objects
    G1 = ext_grid('GEN1', 0, 0.0608, 23.64, dynopt)
    G2 = ext_grid('GEN2', 1, 0.1198, 6.01, dynopt)
    G3 = ext_grid('GEN3', 2, 0.1813, 3.01, dynopt)

    # Create dictionary of elements
    elements = {}
    elements[G1.id] = G1
    elements[G2.id] = G2
    elements[G3.id] = G3

    # Create event stack
    oEvents = events('events.evnt')

    # Create recorder object
    oRecord = recorder('recorder.rcd')