1 # Copyright (C) 2010 Richard Lincoln
3 # This library is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU Lesser General Public
5 # License as published by the Free Software Foundation; either
6 # version 2.1 of the License, or (at your option) any later version.
8 # This library is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 # Lesser General Public License for more details.
13 # You should have received a copy of the GNU Lesser General Public
14 # License along with this library; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA, USA
17 from CIM14
.IEC61970
.Wires
.RatioTapChanger
import RatioTapChanger
19 class DistributionTapChanger(RatioTapChanger
):
20 """Additional ratio tap changer parameters common to distribution line regulators. 'tculControlMode' would always be 'volt'. If 'monitoredPhase' is not specified, then if the controlled DistributionTransformerWinding is single-phase, the PT primary is assumed to be connected across that winding, which is the normal case. If the controlled winding is three-phase, then the 'monitoredPhase' is assumed to be 'AN', unless otherwise specified. Whenever 'ctRatio' and 'ptRatio' are specified, it's customary to specify the R and X in 'volts' referred to the PT secondary circuit, otherwise R and X are in feeder primary ohms. If 'ptRatio' is not specified, then 'targetVoltage', 'limitVoltage', and 'bandVoltage' are on the feeder primary base, phase-neutral or phase-phase depending on the 'monitoredPhase'. Otherwise, these attributes are all on the PT secondary base.
23 def __init__(self
, monitoredPhase
="A", ptRatio
=0.0, reverseLineDropX
=0.0, ctRating
=0.0, reverseLineDropR
=0.0, lineDropCompensation
=False, ctRatio
=0.0, targetVoltage
=0.0, limitVoltage
=0.0, lineDropR
=0.0, lineDropX
=0.0, bandVoltage
=0.0, *args
, **kw_args
):
24 """Initialises a new 'DistributionTapChanger' instance.
26 @param monitoredPhase: Phase voltage controlling this regulator, measured at regulator location. Values are: "A", "AC", "AN", "ABCN", "B", "C", "BN", "CN", "splitSecondary12N", "ABC", "splitSecondary2N", "N", "ABN", "BC", "BCN", "AB", "splitSecondary1N", "ACN"
27 @param ptRatio: Built-in voltage transducer ratio.
28 @param reverseLineDropX: Line drop compensator reactance setting for reverse power flow.
29 @param ctRating: Built-in current transformer primary rating.
30 @param reverseLineDropR: Line drop compensator resistance setting for reverse power flow.
31 @param lineDropCompensation: If true, the line drop compensation is to be applied.
32 @param ctRatio: Built-in current transducer ratio.
33 @param targetVoltage: Target voltage on the PT secondary base.
34 @param limitVoltage: Maximum allowed regulated voltage on the PT secondary base, regardless of line drop compensation. Sometimes referred to as first-house protection.
35 @param lineDropR: Line drop compensator resistance setting for normal (forward) power flow.
36 @param lineDropX: Line drop compensator reactance setting for normal (forward) power flow.
37 @param bandVoltage: Voltage range (max - min) on the PT secondary base, centered on 'targetVoltage'.
39 #: Phase voltage controlling this regulator, measured at regulator location. Values are: "A", "AC", "AN", "ABCN", "B", "C", "BN", "CN", "splitSecondary12N", "ABC", "splitSecondary2N", "N", "ABN", "BC", "BCN", "AB", "splitSecondary1N", "ACN"
40 self
.monitoredPhase
= monitoredPhase
42 #: Built-in voltage transducer ratio.
43 self
.ptRatio
= ptRatio
45 #: Line drop compensator reactance setting for reverse power flow.
46 self
.reverseLineDropX
= reverseLineDropX
48 #: Built-in current transformer primary rating.
49 self
.ctRating
= ctRating
51 #: Line drop compensator resistance setting for reverse power flow.
52 self
.reverseLineDropR
= reverseLineDropR
54 #: If true, the line drop compensation is to be applied.
55 self
.lineDropCompensation
= lineDropCompensation
57 #: Built-in current transducer ratio.
58 self
.ctRatio
= ctRatio
60 #: Target voltage on the PT secondary base.
61 self
.targetVoltage
= targetVoltage
63 #: Maximum allowed regulated voltage on the PT secondary base, regardless of line drop compensation. Sometimes referred to as first-house protection.
64 self
.limitVoltage
= limitVoltage
66 #: Line drop compensator resistance setting for normal (forward) power flow.
67 self
.lineDropR
= lineDropR
69 #: Line drop compensator reactance setting for normal (forward) power flow.
70 self
.lineDropX
= lineDropX
72 #: Voltage range (max - min) on the PT secondary base, centered on 'targetVoltage'.
73 self
.bandVoltage
= bandVoltage
75 super(DistributionTapChanger
, self
).__init
__(*args
, **kw_args
)
77 _attrs
= ["monitoredPhase", "ptRatio", "reverseLineDropX", "ctRating", "reverseLineDropR", "lineDropCompensation", "ctRatio", "targetVoltage", "limitVoltage", "lineDropR", "lineDropX", "bandVoltage"]
78 _attr_types
= {"monitoredPhase": str, "ptRatio": float, "reverseLineDropX": float, "ctRating": float, "reverseLineDropR": float, "lineDropCompensation": bool, "ctRatio": float, "targetVoltage": float, "limitVoltage": float, "lineDropR": float, "lineDropX": float, "bandVoltage": float}
79 _defaults
= {"monitoredPhase": "A", "ptRatio": 0.0, "reverseLineDropX": 0.0, "ctRating": 0.0, "reverseLineDropR": 0.0, "lineDropCompensation": False, "ctRatio": 0.0, "targetVoltage": 0.0, "limitVoltage": 0.0, "lineDropR": 0.0, "lineDropX": 0.0, "bandVoltage": 0.0}
80 _enums
= {"monitoredPhase": "PhaseCode"}