Exemple #1
0
 def __init__(self, system, config):
     ModelData.__init__(self)
     self.node = IdxParam(default=None,
                          info='Node index',
                          mandatory=True,
                          model='Node',
                          )
     self.voltage = NumParam(default=0.0,
                             tex_name='V_0',
                             info='Ground voltage (typically 0)',
                             unit='p.u.',
                             )
     Model.__init__(self, system, config)
     self.flags.update({'pflow': True})
     self.group = 'DCLink'
     self.v = ExtAlgeb(model='Node',
                       src='v',
                       indexer=self.node,
                       e_str='-Idc',
                       ename='-Idc',
                       tex_ename='-I_{dc}',
                       )
     self.Idc = Algeb(tex_name='I_{dc}',
                      info='Ficticious current injection from ground',
                      e_str='u * (v - voltage)',
                      v_str='0',
                      diag_eps=True,
                      )
     self.v.e_str = '-Idc'
Exemple #2
0
    def __init__(self):
        ModelData.__init__(self)

        self.ree = IdxParam(mandatory=True,
                            info='Renewable exciter idx',
                            )

        self.Ht = NumParam(default=3.0, tex_name='H_t',
                           info='Turbine inertia', unit='MWs/MVA',
                           power=True,
                           non_zero=True,
                           )

        self.Hg = NumParam(default=3.0, tex_name='H_g',
                           info='Generator inertia', unit='MWs/MVA',
                           power=True,
                           non_zero=True,
                           )

        self.Dshaft = NumParam(default=1.0, tex_name='D_{shaft}',
                               info='Damping coefficient',
                               unit='p.u. (gen base)',
                               power=True,
                               )

        self.Kshaft = NumParam(default=1.0, tex_name='K_{shaft}',
                               info='Spring constant',
                               unit='p.u. (gen base)',
                               power=True,
                               )

        self.w0 = NumParam(default=1.0, tex_name=r'\omega_0',
                           info='Default speed if not using a torque model',
                           unit='p.u.',
                           )
Exemple #3
0
    def __init__(self):
        ModelData.__init__(self)

        self.rego = IdxParam(
            mandatory=True,
            info='Renewable governor idx',
        )
        self.nblade = NumParam(
            info='number of blades',
            default=3.0,
        )

        self.ngen = NumParam(
            info='number of wind generator units',
            default=50,
        )
        self.npole = NumParam(
            info='number of poles in generator',
            default=4,
        )
        self.R = NumParam(
            info='rotor radius',
            default=30.0,
            unit='m',
        )
        self.ngb = NumParam(
            info='gear box ratio',
            default=5,
        )
        self.rho = NumParam(
            info='air density',
            unit='kg/m3',
            default=1.20,
        )
Exemple #4
0
    def __init__(self):
        ModelData.__init__(self)

        self.ree = IdxParam(
            mandatory=True,
            info='Renewable exciter idx',
        )

        self.H = NumParam(
            default=3.0,
            tex_name='H_t',
            info='Total inertia',
            unit='MWs/MVA',
            power=True,
            non_zero=True,
            non_negative=True,
        )

        self.D = NumParam(
            default=1.0,
            tex_name='D_{shaft}',
            info='Damping coefficient',
            unit='p.u.',
            power=True,
        )

        self.w0 = NumParam(
            default=1.0,
            tex_name=r'\omega_0',
            info='Default speed if not using a torque model',
            unit='p.u.',
        )
Exemple #5
0
    def __init__(self):
        ModelData.__init__(self)

        self.rea = IdxParam(mandatory=True,
                            info='Renewable aerodynamics model idx',
                            )

        self.Kiw = NumParam(default=0.1, info='Pitch-control integral gain',
                            tex_name='K_{iw}',
                            unit='p.u.',
                            )

        self.Kpw = NumParam(default=0.0, info='Pitch-control proportional gain',
                            tex_name='K_{pw}',
                            unit='p.u.',
                            )

        self.Kic = NumParam(default=0.1, info='Pitch-compensation integral gain',
                            tex_name='K_{ic}',
                            unit='p.u.',
                            )

        self.Kpc = NumParam(default=0.0, info='Pitch-compensation proportional gain',
                            tex_name='K_{pc}',
                            unit='p.u.',
                            )

        self.Kcc = NumParam(default=0.0, info='Gain for P diff',
                            tex_name='K_{cc}',
                            unit='p.u.',
                            )

        self.Tp = NumParam(default=0.3, info='Blade response time const.',
                           tex_name=r'T_{\theta}',
                           unit='s',
                           )

        self.thmax = NumParam(default=30.0, info='Max. pitch angle',
                              tex_name=r'\theta_{max}',
                              unit='deg.',
                              vrange=(27, 30),
                              )
        self.thmin = NumParam(default=0.0, info='Min. pitch angle',
                              tex_name=r'\theta_{min}',
                              unit='deg.',
                              )
        self.dthmax = NumParam(default=5.0, info='Max. pitch angle rate',
                               tex_name=r'\theta_{max}',
                               unit='deg.',
                               vrange=(5, 10),
                               )
        self.dthmin = NumParam(default=-5.0, info='Min. pitch angle rate',
                               tex_name=r'\theta_{min}',
                               unit='deg.',
                               vrange=(-10, -5),
                               )
Exemple #6
0
    def __init__(self):
        ModelData.__init__(self)
        self.bus = IdxParam(info="bus idx", mandatory=True)

        self.Ta = NumParam(default=0.1,
                           tex_name='T_a',
                           info='angle filter time constant')
        self.Tv = NumParam(default=0.1,
                           tex_name='T_v',
                           info='voltage filter time constant')
Exemple #7
0
    def __init__(self):
        ModelData.__init__(self)

        self.ree = IdxParam(
            mandatory=True,
            info='Renewable exciter idx',
        )

        self.H = NumParam(
            default=3.0,
            tex_name='H_t',
            info='Total inertia constant',
            unit='MWs/MVA',
            power=True,
            non_zero=True,
            non_negative=True,
        )

        self.DAMP = NumParam(
            default=0.0,
            tex_name='Damp',
            info='Damp coefficient',
            unit='p.u. (gen base)',
            power=True,
        )

        self.Htfrac = NumParam(
            default=0.5,
            tex_name='D_{shaft}',
            info='Turbine inertia fraction (Hturb/H)',
            power=True,
            vrange='[0, 1]',
        )

        self.Freq1 = NumParam(
            default=1,
            tex_name='Freq1',
            unit='p.u. (Hz)',
            info='First shaft torsional resonant frequency, p.u. (Hz)',
        )

        self.Dshaft = NumParam(
            default=1.0,
            tex_name='D_{shaft}',
            info='Shaft damping factor',
            unit='p.u. (gen base)',
            power=True,
        )

        self.w0 = NumParam(
            default=1.0,
            tex_name=r'\omega_0',
            info='Default speed if not using a torque model',
            unit='p.u.',
        )
Exemple #8
0
    def __init__(self):
        ModelData.__init__(self)

        self.bus = IdxParam(
            model='Bus',
            info="interface bus id",
            mandatory=True,
        )
        self.gen = IdxParam(
            info="static generator index",
            mandatory=True,
        )
Exemple #9
0
    def __init__(self, system, config):
        ModelData.__init__(self)
        self.node1 = IdxParam(
            default=None,
            info='Node 1 index',
            mandatory=True,
            model='Node',
        )
        self.node2 = IdxParam(
            default=None,
            info='Node 2 index',
            mandatory=True,
            model='Node',
        )
        self.Vdcn1 = NumParam(
            default=100,
            info='DC voltage rating on node 1',
            unit='kV',
            non_zero=True,
            tex_name='V_{dcn1}',
        )
        self.Vdcn2 = NumParam(
            default=100,
            info='DC voltage rating on node 2',
            unit='kV',
            non_zero=True,
            tex_name='V_{dcn2}',
        )
        self.Idcn = NumParam(
            default=1,
            info='DC current rating',
            unit='kA',
            non_zero=True,
            tex_name='I_{dcn}',
        )

        Model.__init__(self, system, config)
        self.v1 = ExtAlgeb(
            model='Node',
            src='v',
            indexer=self.node1,
            info='DC voltage on node 1',
        )
        self.v2 = ExtAlgeb(
            model='Node',
            src='v',
            indexer=self.node2,
            info='DC voltage on node 2',
        )
Exemple #10
0
    def __init__(self):
        ModelData.__init__(self)

        self.pq = IdxParam(
            model='PQ',
            mandatory=True,
            info='idx of the PQ to replace',
        )
        self.busf = IdxParam(
            model='BusFreq',
            info='optional idx of the BusFreq device to use',
        )

        self.kp = NumParam(
            info='active power percentage',
            default=100.0,
            unit='%',
        )
        self.kq = NumParam(
            info='active power percentage',
            default=100.0,
            unit='%',
        )

        self.Tf = NumParam(
            info='filter time constant',
            unit='s',
            default=0.02,
            non_negative=True,
        )
        self.ap = NumParam(
            info='active power voltage exponent',
            default=1.0,
        )
        self.aq = NumParam(
            info='reactive power voltage exponent',
            default=0.0,
        )
        self.bp = NumParam(
            info='active power frequency exponent',
            default=0.0,
        )
        self.bq = NumParam(
            info='reactive power frequency exponent',
            default=0.0,
        )
Exemple #11
0
    def __init__(self):
        ModelData.__init__(self)

        self.rego = IdxParam(
            mandatory=True,
            info='Renewable governor idx',
        )

        self.Ka = NumParam(default=1.0,
                           info='Aerodynamics gain',
                           tex_name='K_a',
                           non_negative=True,
                           unit='p.u./deg.')

        self.theta0 = NumParam(
            default=0.0,
            info='Initial pitch angle',
            tex_name=r'\theta_0',
            unit='deg.',
        )
Exemple #12
0
    def __init__(self):
        ModelData.__init__(self)

        self.pq = IdxParam(
            model='PQ',
            mandatory=True,
            info='idx of the PQ to replace',
        )

        self.kpp = NumParam(
            info='Percentage of active power',
            mandatory=True,
            tex_name='K_{pp}',
        )
        self.kpi = NumParam(
            info='Percentage of active current',
            mandatory=True,
            tex_name='K_{pi}',
        )
        self.kpz = NumParam(
            info='Percentage of conductance',
            mandatory=True,
            tex_name='K_{pz}',
        )

        self.kqp = NumParam(
            info='Percentage of reactive power',
            mandatory=True,
            tex_name='K_{qp}',
        )
        self.kqi = NumParam(
            info='Percentage of reactive current',
            mandatory=True,
            tex_name='K_{qi}',
        )
        self.kqz = NumParam(
            info='Percentage of susceptance',
            mandatory=True,
            tex_name='K_{qz}',
        )
Exemple #13
0
    def __init__(self):
        ModelData.__init__(self)

        self.bus = IdxParam(
            model='Bus',
            info="interface bus id",
            mandatory=True,
        )
        self.gen = IdxParam(
            info="static generator index",
            mandatory=True,
        )
        self.coi2 = IdxParam(
            model='COI2',
            info="center of inertia 2 index",
        )
        self.Sn = NumParam(
            default=100.0,
            tex_name='S_n',
            info='Model MVA base',
            unit='MVA',
        )

        self.fn = NumParam(
            default=60.0,
            info="rated frequency",
            tex_name='f',
        )
        self.Tc = NumParam(
            default=0.01,
            tex_name='T_c',
            info='switch time constant',
            unit='s',
        )

        self.kw = NumParam(
            default=0.0,
            tex_name=r'k_\omega',
            info='speed droop on active power (reciprocal of droop)',
            unit='p.u.',
            ipower=True,
            non_negative=True,
        )
        self.kv = NumParam(
            default=0,
            tex_name='k_v',
            info='reactive power droop on voltage',
            unit='p.u.',
            power=True,
        )

        self.M = NumParam(
            default=10,
            tex_name='M',
            info='Emulated startup time constant (M=2H)',
            unit='s',
            power=True,
        )
        self.D = NumParam(
            default=0,
            tex_name='D',
            info='Emulated damping coefficient',
            unit='p.u.',
            power=True,
        )

        self.ra = NumParam(default=0.0,
                           info="resistance",
                           z=True,
                           tex_name='r_a')
        self.xs = NumParam(default=0.2,
                           info="reactance",
                           z=True,
                           tex_name='x_s')

        self.gammap = NumParam(default=1.0,
                               info="P ratio of linked static gen",
                               tex_name=r'\gamma_P')
        self.gammaq = NumParam(default=1.0,
                               info="Q ratio of linked static gen",
                               tex_name=r'\gamma_Q')
Exemple #14
0
 def __init__(self):
     ModelData.__init__(self)
     self.Kp = NumParam()
     self.Ki = NumParam()
     self.Wmax = NumParam()
     self.Wmin = NumParam()
Exemple #15
0
    def __init__(self, system, config):
        ModelData.__init__(self)
        Model.__init__(self, system, config)
        self.group = 'Experimental'

        self.flags.tds = True
Exemple #16
0
    def __init__(self):
        ModelData.__init__(self)

        self.reg = IdxParam(model='RenGen',
                            info='Renewable generator idx',
                            mandatory=True,
                            )

        self.busr = IdxParam(info='Optional remote bus for voltage control',
                             model='Bus',
                             default=None,
                             )
        self.PFFLAG = NumParam(info='Power factor control flag; 1-PF control, 0-Q control',
                               mandatory=True,
                               unit='bool',
                               )
        self.VFLAG = NumParam(info='Voltage control flag; 1-Q control, 0-V control',
                              mandatory=True,
                              unit='bool',
                              )
        self.QFLAG = NumParam(info='Q control flag; 1-V or Q control, 0-const. PF or Q',
                              mandatory=True,
                              unit='bool',
                              )
        self.PFLAG = NumParam(info='P speed-dependency flag; 1-has speed dep., 0-no dep.',
                              mandatory=True,
                              unit='bool',
                              )
        self.PQFLAG = NumParam(info='P/Q priority flag for I limit; 0-Q priority, 1-P priority',
                               mandatory=True,
                               unit='bool',
                               )

        self.Vdip = NumParam(default=0.8,
                             tex_name='V_{dip}',
                             info='Low V threshold to activate Iqinj logic',
                             unit='p.u.',
                             )
        self.Vup = NumParam(default=1.2,
                            tex_name='V_{up}',
                            info='V threshold above which to activate Iqinj logic',
                            unit='p.u.',
                            )
        self.Trv = NumParam(default=0.02,
                            tex_name='T_{rv}',
                            info='Voltage filter time constant',
                            )
        self.dbd1 = NumParam(default=-0.02,
                             tex_name='d_{bd1}',
                             info='Lower bound of the voltage deadband (<=0)',
                             )
        self.dbd2 = NumParam(default=0.02,
                             tex_name='d_{bd2}',
                             info='Upper bound of the voltage deadband (>=0)',
                             )
        self.Kqv = NumParam(default=1.0,
                            vrange=(0, 10),
                            tex_name='K_{qv}',
                            info='Gain to compute Iqinj from V error',
                            )
        self.Iqh1 = NumParam(default=999.0,
                             tex_name='I_{qh1}',
                             info='Upper limit on Iqinj',
                             )
        self.Iql1 = NumParam(default=-999.0,
                             tex_name='I_{ql1}',
                             info='Lower limit on Iqinj',
                             )
        self.Vref0 = NumParam(default=1.0,
                              tex_name='V_{ref0}',
                              info='User defined Vref (if 0, use initial bus V)',
                              )
        self.Iqfrz = NumParam(default=0.0,
                              tex_name='I_{qfrz}',
                              info='Hold Iqinj at the value for Thld (>0) seconds following a Vdip',
                              )
        self.Thld = NumParam(default=0.0,
                             tex_name='T_{hld}',
                             unit='s',
                             info='Time for which Iqinj is held. Hold at Iqinj if>0; hold at State 1 if<0',
                             )
        self.Thld2 = NumParam(default=0.0,
                              tex_name='T_{hld2}',
                              unit='s',
                              info='Time for which IPMAX is held after voltage dip ends',
                              )
        self.Tp = NumParam(default=0.02,
                           tex_name='T_p',
                           unit='s',
                           info='Filter time constant for Pe',
                           )
        self.QMax = NumParam(default=999.0,
                             tex_name='Q_{max}',
                             info='Upper limit for reactive power regulator',
                             )
        self.QMin = NumParam(default=-999.0,
                             tex_name='Q_{min}',
                             info='Lower limit for reactive power regulator',
                             )
        self.VMAX = NumParam(default=999.0,
                             tex_name='V_{max}',
                             info='Upper limit for voltage control',
                             )
        self.VMIN = NumParam(default=-999.0,
                             tex_name='V_{min}',
                             info='Lower limit for voltage control',
                             )
        self.Kqp = NumParam(default=1.0,
                            tex_name='K_{qp}',
                            info='Proportional gain for reactive power error',
                            )
        self.Kqi = NumParam(default=0.1,
                            tex_name='K_{qi}',
                            info='Integral gain for reactive power error',
                            )
        self.Kvp = NumParam(default=1.0,
                            tex_name='K_{vp}',
                            info='Proportional gain for voltage error',
                            )
        self.Kvi = NumParam(default=0.1,
                            tex_name='K_{vi}',
                            info='Integral gain for voltage error',
                            )
        self.Vref1 = NumParam(default=1.0,
                              non_zero=True,
                              tex_name='V_{ref1}',
                              info='Voltage ref. if VFLAG=0',
                              )
        self.Tiq = NumParam(default=0.02,
                            tex_name='T_{iq}',
                            info='Filter time constant for Iq',
                            )
        self.dPmax = NumParam(default=999.0,
                              tex_name='d_{Pmax}',
                              info='Power reference max. ramp rate (>0)',
                              )
        self.dPmin = NumParam(default=-999.0,
                              tex_name='d_{Pin}',
                              info='Power reference min. ramp rate (<0)',
                              )
        self.PMAX = NumParam(default=999.0,
                             tex_name='P_{max}',
                             info='Max. active power limit > 0',
                             )
        self.PMIN = NumParam(default=0.0,
                             tex_name='P_{min}',
                             info='Min. active power limit',
                             )
        self.Imax = NumParam(default=999.0,
                             tex_name='I_{max}',
                             info='Max. apparent current limit',
                             current=True,
                             )
        self.Tpord = NumParam(default=0.02,
                              tex_name='T_{pord}',
                              info='Filter time constant for power setpoint',
                              )
        self.Vq1 = NumParam(default=0.2,
                            tex_name='V_{q1}',
                            info='Reactive power V-I pair (point 1), voltage',
                            )
        self.Iq1 = NumParam(default=2.0,
                            tex_name='I_{q1}',
                            info='Reactive power V-I pair (point 1), current',
                            current=True,
                            )
        self.Vq2 = NumParam(default=0.4,
                            tex_name='V_{q2}',
                            info='Reactive power V-I pair (point 2), voltage',
                            )
        self.Iq2 = NumParam(default=4.0,
                            tex_name='I_{q2}',
                            info='Reactive power V-I pair (point 2), current',
                            current=True,
                            )
        self.Vq3 = NumParam(default=0.8,
                            tex_name='V_{q3}',
                            info='Reactive power V-I pair (point 3), voltage',
                            )
        self.Iq3 = NumParam(default=8.0,
                            tex_name='I_{q3}',
                            info='Reactive power V-I pair (point 3), current',
                            current=True,
                            )
        self.Vq4 = NumParam(default=1.0,
                            tex_name='V_{q4}',
                            info='Reactive power V-I pair (point 4), voltage',
                            )
        self.Iq4 = NumParam(default=10,
                            tex_name='I_{q4}',
                            info='Reactive power V-I pair (point 4), current',
                            current=True,
                            )
        self.Vp1 = NumParam(default=0.2,
                            tex_name='V_{p1}',
                            info='Active power V-I pair (point 1), voltage',
                            )
        self.Ip1 = NumParam(default=2.0,
                            tex_name='I_{p1}',
                            info='Active power V-I pair (point 1), current',
                            current=True,
                            )
        self.Vp2 = NumParam(default=0.4,
                            tex_name='V_{p2}',
                            info='Active power V-I pair (point 2), voltage',
                            )
        self.Ip2 = NumParam(default=4.0,
                            tex_name='I_{p2}',
                            info='Active power V-I pair (point 2), current',
                            current=True,
                            )
        self.Vp3 = NumParam(default=0.8,
                            tex_name='V_{p3}',
                            info='Active power V-I pair (point 3), voltage',
                            )
        self.Ip3 = NumParam(default=8.0,
                            tex_name='I_{p3}',
                            info='Active power V-I pair (point 3), current',
                            current=True,
                            )
        self.Vp4 = NumParam(default=1.0,
                            tex_name='V_{p4}',
                            info='Active power V-I pair (point 4), voltage',
                            )
        self.Ip4 = NumParam(default=12.0,
                            tex_name='I_{p4}',
                            info='Active power V-I pair (point 4), current',
                            current=True,
                            )
Exemple #17
0
    def __init__(self):
        ModelData.__init__(self)

        self.rep = IdxParam(mandatory=True,
                            info='RenPitch controller idx',
                            )

        self.Kip = NumParam(default=0.1, info='Pref-control integral gain',
                            tex_name='K_{ip}',
                            unit='p.u.',
                            )

        self.Kpp = NumParam(default=0.0, info='Pref-control proportional gain',
                            tex_name='K_{pp}',
                            unit='p.u.',
                            )

        self.Tp = NumParam(default=0.05, info='Pe sensing time const.',
                           tex_name='T_p',
                           unit='s',
                           )

        self.Twref = NumParam(default=30.0, info='Speed reference time const.',
                              tex_name='T_{wref}',
                              unit='s',
                              vrange=(30, 60),
                              )

        self.Temax = NumParam(default=1.2, info='Max. electric torque',
                              tex_name='T_{emax}',
                              unit='p.u.',
                              vrange=(1.1, 1.2),
                              power=True,
                              )

        self.Temin = NumParam(default=0.0, info='Min. electric torque',
                              tex_name='T_{emin}',
                              unit='p.u.',
                              power=True,
                              )

        self.Tflag = NumParam(info='Tflag; 1-power error, 0-speed error',
                              mandatory=True,
                              unit='bool',
                              )

        self.p1 = NumParam(default=0.2, info='Active power point 1',
                           unit='p.u.', tex_name='p_1',
                           power=True,
                           )
        self.sp1 = NumParam(default=0.58, info='Speed power point 1',
                            unit='p.u.', tex_name='s_{p1}',
                            )

        self.p2 = NumParam(default=0.4, info='Active power point 2',
                           unit='p.u.', tex_name='p_2',
                           power=True,
                           )
        self.sp2 = NumParam(default=0.72, info='Speed power point 2',
                            unit='p.u.', tex_name='s_{p2}',
                            )

        self.p3 = NumParam(default=0.6, info='Active power point 3',
                           unit='p.u.', tex_name='p_3',
                           power=True,
                           )
        self.sp3 = NumParam(default=0.86, info='Speed power point 3',
                            unit='p.u.', tex_name='s_{p3}',
                            )

        self.p4 = NumParam(default=0.8, info='Active power point 4',
                           unit='p.u.', tex_name='p_4',
                           power=True,
                           )
        self.sp4 = NumParam(default=1.0, info='Speed power point 4',
                            unit='p.u.', tex_name='s_{p4}',
                            )
        self.Tn = NumParam(default=np.nan, tex_name='T_n',
                           info='Turbine rating. Use Sn from gov if none.',
                           unit='MVA',
                           )
Exemple #18
0
    def __init__(self):
        ModelData.__init__(self)

        self.ree = IdxParam(
            info='RenExciter idx',
            model='RenExciter',
            mandatory=True,
        )

        self.line = IdxParam(
            info='Idx of line that connect to measured bus',
            model='ACLine',
            mandatory=True,
        )

        self.busr = IdxParam(
            info='Optional remote bus for voltage and freq. measurement',
            model='Bus',
            default=None,
        )

        self.busf = IdxParam(
            info='BusFreq idx for mode 2',
            model='BusFreq',
            default=None,
        )

        # --- flags ---
        self.VCFlag = NumParam(
            info=
            'Droop flag; 0-with droop if power factor ctrl, 1-line drop comp.',
            mandatory=True,
            unit='bool',
        )

        self.RefFlag = NumParam(
            info='Q/V select; 0-Q control, 1-V control',
            mandatory=True,
            unit='bool',
        )

        self.Fflag = NumParam(
            info='Frequency control flag; 0-disable, 1-enable',
            mandatory=True,
            unit='bool',
        )

        self.PLflag = NumParam(
            info='Pline ctrl. flag; 0-disable, 1-enable',
            mandatory=True,
            unit='bool',
        )

        self.Tfltr = NumParam(
            default=0.02,
            tex_name='T_{fltr}',
            info='V or Q filter time const.',
        )

        self.Kp = NumParam(
            default=1.0,
            tex_name='K_p',
            info='Q proportional gain',
        )

        self.Ki = NumParam(
            default=0.1,
            tex_name='K_i',
            info='Q integral gain',
        )

        self.Tft = NumParam(
            default=1.0,
            tex_name='T_{ft}',
            info='Lead time constant',
        )

        self.Tfv = NumParam(
            default=1.0,
            tex_name='T_{fv}',
            info='Lag time constant',
        )

        self.Vfrz = NumParam(
            default=0.8,
            tex_name='V_{frz}',
            info='Voltage below which s2 is frozen',
        )

        self.Rc = NumParam(
            default=None,
            tex_name='R_c',
            info='Line drop compensation R',
        )

        self.Xc = NumParam(
            default=None,
            tex_name='X_c',
            info='Line drop compensation R',
        )

        self.Kc = NumParam(
            default=0.0,
            tex_name='K_c',
            info='Reactive power compensation gain',
        )

        self.emax = NumParam(
            default=999,
            tex_name='e_{max}',
            info='Upper limit on deadband output',
        )

        self.emin = NumParam(
            default=-999,
            tex_name='e_{min}',
            info='Lower limit on deadband output',
        )

        self.dbd1 = NumParam(
            default=-0.1,
            tex_name='d_{bd1}',
            info='Lower threshold for reactive power control deadband (<=0)',
        )

        self.dbd2 = NumParam(
            default=0.1,
            tex_name='d_{bd2}',
            info='Upper threshold for reactive power control deadband (>=0)',
        )

        self.Qmax = NumParam(
            default=999.0,
            tex_name='Q_{max}',
            info='Upper limit on output of V-Q control',
        )

        self.Qmin = NumParam(
            default=-999.0,
            tex_name='Q_{min}',
            info='Lower limit on output of V-Q control',
        )

        self.Kpg = NumParam(
            default=1.0,
            tex_name='K_{pg}',
            info='Proportional gain for power control',
        )

        self.Kig = NumParam(
            default=0.1,
            tex_name='K_{ig}',
            info='Integral gain for power control',
        )

        self.Tp = NumParam(
            default=0.02,
            tex_name='T_p',
            info='Time constant for P measurement',
        )

        self.fdbd1 = NumParam(
            default=-0.0002833,
            tex_name='f_{dbd1}',
            info='Lower threshold for freq. error deadband',
            unit='p.u. (Hz)',
        )

        self.fdbd2 = NumParam(
            default=0.0002833,
            tex_name='f_{dbd2}',
            info='Upper threshold for freq. error deadband',
            unit='p.u. (Hz)',
        )

        self.femax = NumParam(
            default=0.05,
            tex_name='f_{emax}',
            info='Upper limit for freq. error',
        )

        self.femin = NumParam(
            default=-0.05,
            tex_name='f_{emin}',
            info='Lower limit for freq. error',
        )

        self.Pmax = NumParam(
            default=999,
            tex_name='P_{max}',
            info='Upper limit on power error (used by PI ctrl.)',
            unit='p.u. (MW)',
            power=True,
        )

        self.Pmin = NumParam(
            default=-999,
            tex_name='P_{min}',
            info='Lower limit on power error (used by PI ctrl.)',
            unit='p.u. (MW)',
            power=True,
        )

        self.Tg = NumParam(
            default=0.02,
            tex_name='T_g',
            info='Power controller lag time constant',
        )

        self.Ddn = NumParam(
            default=10,
            tex_name='D_{dn}',
            info='Reciprocal of droop for over-freq. conditions',
        )

        self.Dup = NumParam(
            default=10,
            tex_name='D_{up}',
            info='Reciprocal of droop for under-freq. conditions',
        )
Exemple #19
0
 def __init__(self):
     ModelData.__init__(self)
     self.bus = IdxParam(model='Bus',
                         info="interface bus id",
                         mandatory=True,
                         )
     self.gen = IdxParam(info="static generator index",
                         model='StaticGen',
                         mandatory=True,
                         )
     self.Sn = NumParam(default=100.0,
                        info="Power rating",
                        tex_name='S_n',
                        unit='MVA',
                        )
     self.Vn = NumParam(default=110.0,
                        info="AC voltage rating",
                        tex_name='V_n',
                        )
     self.ra = NumParam(info='armature resistance',
                        default=0.0,
                        tex_name='r_a',
                        z=True,
                        )
     self.xs = NumParam(info='generator transient reactance',
                        default=0.2,
                        non_zero=True,
                        tex_name='x_s',
                        z=True,
                        )
     self.fn = NumParam(default=60.0,
                        info="rated frequency",
                        tex_name='f_n',
                        )
     self.Vflag = NumParam(default=1.0,
                           info='playback voltage signal',
                           vrange=(0, 1),
                           unit='bool',
                           )
     self.fflag = NumParam(default=1.0,
                           info='playback frequency signal',
                           vrange=(0, 1),
                           unit='bool',
                           )
     self.filename = DataParam(default='',
                               info='playback file name',
                               mandatory=True,
                               unit='string')
     self.Vscale = NumParam(default=1.0,
                            info='playback voltage scale',
                            non_negative=True,
                            unit='pu',
                            tex_name='V_{scale}',
                            )
     self.fscale = NumParam(default=1.0,
                            info='playback frequency scale',
                            non_negative=True,
                            unit='pu',
                            tex_name='f_{scale}',
                            )
     self.Tv = NumParam(default=0.2,
                        info='filtering time constant for voltage',
                        non_negative=True,
                        unit='s',
                        tex_name='T_v',
                        )
     self.Tf = NumParam(default=0.2,
                        info='filtering time constant for frequency',
                        non_negative=True,
                        unit='s',
                        tex_name='T_f',
                        )
Exemple #20
0
    def __init__(self):
        ModelData.__init__(self)

        self.bus1 = IdxParam(model='Bus', info="idx of from bus")
        self.bus2 = IdxParam(model='Bus', info="idx of to bus")
Exemple #21
0
    def __init__(self, system, config):
        ModelData.__init__(self)
        self.bus = IdxParam(
            model='Bus',
            info="idx of connected bus",
            mandatory=True,
        )
        self.node1 = IdxParam(
            default=None,
            info='Node 1 index',
            mandatory=True,
            model='Node',
        )
        self.node2 = IdxParam(
            default=None,
            info='Node 2 index',
            mandatory=True,
            model='Node',
        )
        self.Vn = NumParam(
            default=110.0,
            info="AC voltage rating",
            non_zero=True,
            tex_name=r'V_n',
        )
        self.Vdcn1 = NumParam(
            default=100,
            info='DC voltage rating on node 1',
            unit='kV',
            non_zero=True,
            tex_name='V_{dcn1}',
        )
        self.Vdcn2 = NumParam(
            default=100,
            info='DC voltage rating on node 2',
            unit='kV',
            non_zero=True,
            tex_name='V_{dcn2}',
        )
        self.Idcn = NumParam(
            default=1,
            info='DC current rating',
            unit='kA',
            non_zero=True,
            tex_name='I_{dcn}',
        )

        Model.__init__(self, system, config)
        self.a = ExtAlgeb(
            model='Bus',
            src='a',
            indexer=self.bus,
            info='AC bus voltage phase',
        )
        self.v = ExtAlgeb(
            model='Bus',
            src='v',
            indexer=self.bus,
            info='AC bus voltage magnitude',
        )
        self.v1 = ExtAlgeb(
            model='Node',
            src='v',
            indexer=self.node1,
            info='DC node 1 voltage',
        )
        self.v2 = ExtAlgeb(
            model='Node',
            src='v',
            indexer=self.node2,
            info='DC node 2 voltage',
        )
Exemple #22
0
    def __init__(self):
        ModelData.__init__(self)

        self.bus = IdxParam(model='Bus',
                            info="interface bus id",
                            mandatory=True,
                            )
        self.gen = IdxParam(info="static generator index",
                            mandatory=True,
                            )
        self.Sn = NumParam(default=100.0, tex_name='S_n',
                           info='Model MVA base',
                           unit='MVA',
                           )

        self.Tg = NumParam(default=0.1, tex_name='T_g',
                           info='converter time const.', unit='s',
                           )
        self.Rrpwr = NumParam(default=10.0, tex_name='R_{rpwr}',
                              info='Low voltage power logic (LVPL) ramp limit',
                              unit='p.u.',
                              )
        self.Brkpt = NumParam(default=1.0, tex_name='B_{rkpt}',
                              info='LVPL characteristic voltage 2',
                              unit='p.u.',
                              )
        self.Zerox = NumParam(default=0.5, tex_name='Z_{erox}',
                              info='LVPL characteristic voltage 1',
                              unit='p.u',
                              )
        # TODO: ensure Brkpt > Zerox
        self.Lvplsw = NumParam(default=1.0, tex_name='z_{Lvplsw}',
                               info='Low volt. P logic: 1-enable, 0-disable',
                               unit='bool',
                               )

        self.Lvpl1 = NumParam(default=1.0, tex_name='L_{vpl1}',
                              info='LVPL gain',
                              unit='p.u',
                              )
        self.Volim = NumParam(default=1.2, tex_name='V_{olim}',
                              info='Voltage lim for high volt. reactive current mgnt.',
                              unit='p.u.',
                              )
        self.Lvpnt1 = NumParam(default=0.8, tex_name='L_{vpnt1}',
                               info='High volt. point for low volt. active current mgnt.',
                               unit='p.u.',
                               )
        self.Lvpnt0 = NumParam(default=0.4, tex_name='L_{vpnt0}',
                               info='Low volt. point for low volt. active current mgnt.',
                               unit='p.u.',
                               )
        # TODO: ensure Lvpnt1 > Lvpnt0
        self.Iolim = NumParam(default=-1.5, tex_name='I_{olim}',
                              info='lower current limit for high volt. reactive current mgnt.',
                              unit='p.u. (mach base)',
                              current=True,
                              )
        self.Tfltr = NumParam(default=0.1, tex_name='T_{fltr}',
                              info='Voltage filter T const for low volt. active current mgnt.',
                              unit='s',
                              )
        self.Khv = NumParam(default=0.7, tex_name='K_{hv}',
                            info='Overvolt. compensation gain in high volt. reactive current mgnt.',
                            )
        self.Iqrmax = NumParam(default=1, tex_name='I_{qrmax}',
                               info='Upper limit on the ROC for reactive current',
                               unit='p.u.',
                               current=True,
                               )
        self.Iqrmin = NumParam(default=-1, tex_name='I_{qrmin}',
                               info='Lower limit on the ROC for reactive current',
                               unit='p.u.',
                               current=True,
                               )
        self.Accel = NumParam(default=0.0, tex_name='A_{ccel}',
                              info='Acceleration factor',
                              vrange=(0, 1.0),
                              )
        self.gammap = NumParam(default=1.0,
                               info="P ratio of linked static gen",
                               tex_name=r'\gamma_P'
                               )
        self.gammaq = NumParam(default=1.0,
                               info="Q ratio of linked static gen",
                               tex_name=r'\gamma_Q'
                               )
Exemple #23
0
    def __init__(self):
        ModelData.__init__(self)
        self.bus = IdxParam(model='Bus',
                            info="interface bus id",
                            mandatory=True,
                            )

        self.Sn = NumParam(default=100.0,
                           info="Power rating",
                           tex_name='S_n',
                           )

        self.Vn = NumParam(default=110.0,
                           info="AC voltage rating",
                           tex_name='V_n',
                           )
        self.fn = NumParam(default=60.0,
                           info="rated frequency",
                           tex_name='f',
                           )

        self.rs = NumParam(default=0.01,
                           info="rotor resistance",
                           z=True,
                           tex_name='r_s',
                           non_zero=True,
                           )

        self.xs = NumParam(default=0.15,
                           info="rotor reactance",
                           z=True,
                           tex_name='x_s',
                           non_zero=True,
                           )
        self.rr1 = NumParam(default=0.05,
                            info="1st cage rotor resistance",
                            z=True,
                            non_zero=True,
                            tex_name='r_{R1}',
                            )
        self.xr1 = NumParam(default=0.15,
                            info="1st cage rotor reactance",
                            z=True,
                            tex_name='x_{R1}',
                            non_zero=True,
                            )
        self.rr2 = NumParam(default=0.001,
                            info="2st cage rotor resistance",
                            z=True,
                            non_zero=True,
                            tex_name='r_{R2}',
                            )
        self.xr2 = NumParam(default=0.04,
                            info="2st cage rotor reactance",
                            z=True,
                            tex_name='x_{R2}',
                            non_zero=True,
                            )

        self.xm = NumParam(default=5.0,
                           info="magnetization reactance",
                           z=True,
                           tex_name='x_m',
                           non_zero=True,
                           )

        self.Hm = NumParam(default=3.0,
                           info='Inertia constant',
                           power=True,
                           tex_name='H_m',
                           unit='kWs/KVA',
                           )

        self.c1 = NumParam(default=0.1,
                           info='1st coeff. of Tm(w)',
                           tex_name='c_1',
                           )

        self.c2 = NumParam(default=0.02,
                           info='2nd coeff. of Tm(w)',
                           tex_name='c_2',
                           )

        self.c3 = NumParam(default=0.02,
                           info='3rd coeff. of Tm(w)',
                           tex_name='c_3',
                           )

        self.zb = NumParam(default=1.0,
                           info='Allow working as brake',
                           tex_name='z_b',
                           vrange=(0, 1),
                           )