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
.CPSM
.Equipment
.Wires
.TapChanger
import TapChanger
23 class PhaseTapChanger(TapChanger
):
24 """A specialization of a voltage tap changer that has detailed modeling for phase shifting capabilities. A phase shifting tap changer is also in general a voltage magnitude transformer. The symmetrical and asymmetrical transformer tap changer models are defined here.- The attribute ltcflag specifies whether or not a TapChanger has load tap changing capabilities. If the ltcFlag is true, the attributes “highStep”, “lowStep”, “neutralStep”, “normalStep” and 'stepPhaseShiftIncrement' are all required. - The attributes voltageStepIncrementOutOfPhase, windingConnectionAngle, xStepMax, and xStepMin are not required.
27 def __init__(self
, nominalVoltageOutOfPhase
=0.0, windingConnectionAngle
=0.0, phaseTapChangerType
="asymmetrical", xStepMin
=0.0, xStepMax
=0.0, stepPhaseShiftIncrement
=0.0, voltageStepIncrementOutOfPhase
=0.0, TransformerWinding
=None, PhaseVariationCurve
=None, *args
, **kw_args
):
28 """Initialises a new 'PhaseTapChanger' instance.
30 @param nominalVoltageOutOfPhase: Similar to TapChanger.nominalVoltage, but this is the nominal voltage in the out of phase winding at the nominal tap step. A typical case may have zero voltage at the nominal step, indicating no phase shift at the nominal voltage.
31 @param windingConnectionAngle: The phase angle between the in-phase winding and the out-of -phase winding used for creating phase shift. It is only possible to have a symmemtrical transformer if this angle is 90 degrees.
32 @param phaseTapChangerType: The type of phase shifter construction. Values are: "asymmetrical", "symmetrical", "unknown"
33 @param xStepMin: The reactance at the minimum tap step.
34 @param xStepMax: The reactance at the maximum tap step.
35 @param stepPhaseShiftIncrement: Phase shift per step position. A positive value indicates a positive phase shift from the winding where the tap is located to the other winding (for a two-winding transformer). The actual phase shift increment might be more accurately computed from the symmetrical or asymmetrical models or a tap step table lookup if those are available.
36 @param voltageStepIncrementOutOfPhase: The voltage step increment on the out of phase winding. This voltage step on the out of phase winding of the phase shifter. Similar to TapChanger.voltageStepIncrement, but it is applied only to the out of phase winding.
37 @param TransformerWinding: The transformer winding to which the phase tap changer belongs.
38 @param PhaseVariationCurve: A PhaseTapChanger can have an associated PhaseVariationCurve to define phase shift variations with tap step changes.
40 #: Similar to TapChanger.nominalVoltage, but this is the nominal voltage in the out of phase winding at the nominal tap step. A typical case may have zero voltage at the nominal step, indicating no phase shift at the nominal voltage.
41 self
.nominalVoltageOutOfPhase
= nominalVoltageOutOfPhase
43 #: The phase angle between the in-phase winding and the out-of -phase winding used for creating phase shift. It is only possible to have a symmemtrical transformer if this angle is 90 degrees.
44 self
.windingConnectionAngle
= windingConnectionAngle
46 #: The type of phase shifter construction. Values are: "asymmetrical", "symmetrical", "unknown"
47 self
.phaseTapChangerType
= phaseTapChangerType
49 #: The reactance at the minimum tap step.
50 self
.xStepMin
= xStepMin
52 #: The reactance at the maximum tap step.
53 self
.xStepMax
= xStepMax
55 #: Phase shift per step position. A positive value indicates a positive phase shift from the winding where the tap is located to the other winding (for a two-winding transformer). The actual phase shift increment might be more accurately computed from the symmetrical or asymmetrical models or a tap step table lookup if those are available.
56 self
.stepPhaseShiftIncrement
= stepPhaseShiftIncrement
58 #: The voltage step increment on the out of phase winding. This voltage step on the out of phase winding of the phase shifter. Similar to TapChanger.voltageStepIncrement, but it is applied only to the out of phase winding.
59 self
.voltageStepIncrementOutOfPhase
= voltageStepIncrementOutOfPhase
61 self
._TransformerWinding
= None
62 self
.TransformerWinding
= TransformerWinding
64 self
._PhaseVariationCurve
= None
65 self
.PhaseVariationCurve
= PhaseVariationCurve
67 super(PhaseTapChanger
, self
).__init
__(*args
, **kw_args
)
69 _attrs
= ["nominalVoltageOutOfPhase", "windingConnectionAngle", "phaseTapChangerType", "xStepMin", "xStepMax", "stepPhaseShiftIncrement", "voltageStepIncrementOutOfPhase"]
70 _attr_types
= {"nominalVoltageOutOfPhase": float, "windingConnectionAngle": float, "phaseTapChangerType": str, "xStepMin": float, "xStepMax": float, "stepPhaseShiftIncrement": float, "voltageStepIncrementOutOfPhase": float}
71 _defaults
= {"nominalVoltageOutOfPhase": 0.0, "windingConnectionAngle": 0.0, "phaseTapChangerType": "asymmetrical", "xStepMin": 0.0, "xStepMax": 0.0, "stepPhaseShiftIncrement": 0.0, "voltageStepIncrementOutOfPhase": 0.0}
72 _enums
= {"phaseTapChangerType": "PhaseTapChangerKind"}
73 _refs
= ["TransformerWinding", "PhaseVariationCurve"]
76 def getTransformerWinding(self
):
77 """The transformer winding to which the phase tap changer belongs.
79 return self
._TransformerWinding
81 def setTransformerWinding(self
, value
):
82 if self
._TransformerWinding
is not None:
83 self
._TransformerWinding
._PhaseTapChanger
= None
85 self
._TransformerWinding
= value
86 if self
._TransformerWinding
is not None:
87 self
._TransformerWinding
.PhaseTapChanger
= None
88 self
._TransformerWinding
._PhaseTapChanger
= self
90 TransformerWinding
= property(getTransformerWinding
, setTransformerWinding
)
92 def getPhaseVariationCurve(self
):
93 """A PhaseTapChanger can have an associated PhaseVariationCurve to define phase shift variations with tap step changes.
95 return self
._PhaseVariationCurve
97 def setPhaseVariationCurve(self
, value
):
98 if self
._PhaseVariationCurve
is not None:
99 self
._PhaseVariationCurve
._PhaseTapChanger
= None
101 self
._PhaseVariationCurve
= value
102 if self
._PhaseVariationCurve
is not None:
103 self
._PhaseVariationCurve
.PhaseTapChanger
= None
104 self
._PhaseVariationCurve
._PhaseTapChanger
= self
106 PhaseVariationCurve
= property(getPhaseVariationCurve
, setPhaseVariationCurve
)