1 # Copyright (C) 2010-2011 Richard Lincoln
3 # Permission is hereby granted, free of charge, to any person obtaining a copy
4 # of this software and associated documentation files (the "Software"), to
5 # deal in the Software without restriction, including without limitation the
6 # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
7 # sell copies of the Software, and to permit persons to whom the Software is
8 # furnished to do so, subject to the following conditions:
10 # The above copyright notice and this permission notice shall be included in
11 # all copies or substantial portions of the Software.
13 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
18 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
21 from CIM14
.CDPSM
.Balanced
.IEC61970
.Wires
.RatioTapChanger
import RatioTapChanger
23 class DistributionTapChanger(RatioTapChanger
):
24 """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.
27 def __init__(self
, lineDropR
=0.0, monitoredPhase
="ABC", lineDropCompensation
=False, ptRatio
=0.0, ctRatio
=0.0, reverseLineDropR
=0.0, limitVoltage
=0.0, reverseLineDropX
=0.0, bandVoltage
=0.0, targetVoltage
=0.0, lineDropX
=0.0, *args
, **kw_args
):
28 """Initialises a new 'DistributionTapChanger' instance.
30 @param lineDropR: Line drop compensator resistance setting for normal (forward) power flow.
31 @param monitoredPhase: Phase voltage controlling this regulator, measured at regulator location. Values are: "ABC", "splitSecondary2N", "ABN", "CN", "ACN", "BC", "AN", "BN", "AB", "splitSecondary1N", "N", "C", "AC", "ABCN", "splitSecondary12N", "A", "B", "BCN"
32 @param lineDropCompensation: If true, the line drop compensation is to be applied.
33 @param ptRatio: Built-in voltage transducer ratio.
34 @param ctRatio: Built-in current transducer ratio.
35 @param reverseLineDropR: Line drop compensator resistance setting for reverse power flow.
36 @param limitVoltage: Maximum allowed regulated voltage on the PT secondary base, regardless of line drop compensation. Sometimes referred to as first-house protection.
37 @param reverseLineDropX: Line drop compensator reactance setting for reverse power flow.
38 @param bandVoltage: Voltage range (max - min) on the PT secondary base, centered on 'targetVoltage'.
39 @param targetVoltage: Target voltage on the PT secondary base.
40 @param lineDropX: Line drop compensator reactance setting for normal (forward) power flow.
42 #: Line drop compensator resistance setting for normal (forward) power flow.
43 self
.lineDropR
= lineDropR
45 #: Phase voltage controlling this regulator, measured at regulator location. Values are: "ABC", "splitSecondary2N", "ABN", "CN", "ACN", "BC", "AN", "BN", "AB", "splitSecondary1N", "N", "C", "AC", "ABCN", "splitSecondary12N", "A", "B", "BCN"
46 self
.monitoredPhase
= monitoredPhase
48 #: If true, the line drop compensation is to be applied.
49 self
.lineDropCompensation
= lineDropCompensation
51 #: Built-in voltage transducer ratio.
52 self
.ptRatio
= ptRatio
54 #: Built-in current transducer ratio.
55 self
.ctRatio
= ctRatio
57 #: Line drop compensator resistance setting for reverse power flow.
58 self
.reverseLineDropR
= reverseLineDropR
60 #: Maximum allowed regulated voltage on the PT secondary base, regardless of line drop compensation. Sometimes referred to as first-house protection.
61 self
.limitVoltage
= limitVoltage
63 #: Line drop compensator reactance setting for reverse power flow.
64 self
.reverseLineDropX
= reverseLineDropX
66 #: Voltage range (max - min) on the PT secondary base, centered on 'targetVoltage'.
67 self
.bandVoltage
= bandVoltage
69 #: Target voltage on the PT secondary base.
70 self
.targetVoltage
= targetVoltage
72 #: Line drop compensator reactance setting for normal (forward) power flow.
73 self
.lineDropX
= lineDropX
75 super(DistributionTapChanger
, self
).__init
__(*args
, **kw_args
)
77 _attrs
= ["lineDropR", "monitoredPhase", "lineDropCompensation", "ptRatio", "ctRatio", "reverseLineDropR", "limitVoltage", "reverseLineDropX", "bandVoltage", "targetVoltage", "lineDropX"]
78 _attr_types
= {"lineDropR": float, "monitoredPhase": str, "lineDropCompensation": bool, "ptRatio": float, "ctRatio": float, "reverseLineDropR": float, "limitVoltage": float, "reverseLineDropX": float, "bandVoltage": float, "targetVoltage": float, "lineDropX": float}
79 _defaults
= {"lineDropR": 0.0, "monitoredPhase": "ABC", "lineDropCompensation": False, "ptRatio": 0.0, "ctRatio": 0.0, "reverseLineDropR": 0.0, "limitVoltage": 0.0, "reverseLineDropX": 0.0, "bandVoltage": 0.0, "targetVoltage": 0.0, "lineDropX": 0.0}
80 _enums
= {"monitoredPhase": "PhaseCode"}