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
.TapChanger
import TapChanger
19 class PhaseTapChanger(TapChanger
):
20 """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.
23 def __init__(self
, phaseTapChangerType
="asymmetrical", nominalVoltageOutOfPhase
=0.0, xStepMin
=0.0, stepPhaseShiftIncrement
=0.0, windingConnectionAngle
=0.0, xStepMax
=0.0, voltageStepIncrementOutOfPhase
=0.0, PhaseVariationCurve
=None, Winding
=None, TransformerWinding
=None, *args
, **kw_args
):
24 """Initialises a new 'PhaseTapChanger' instance.
26 @param phaseTapChangerType: The type of phase shifter construction. Values are: "asymmetrical", "unknown", "symmetrical"
27 @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.
28 @param xStepMin: The reactance at the minimum tap step.
29 @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.
30 @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.
31 @param xStepMax: The reactance at the maximum tap step.
32 @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.
33 @param PhaseVariationCurve: A PhaseTapChanger can have an associated PhaseVariationCurve to define phase shift variations with tap step changes.
34 @param Winding: Transformer winding to which this phase tap changer belongs.
35 @param TransformerWinding: The transformer winding to which the phase tap changer belongs.
37 #: The type of phase shifter construction. Values are: "asymmetrical", "unknown", "symmetrical"
38 self
.phaseTapChangerType
= phaseTapChangerType
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 reactance at the minimum tap step.
44 self
.xStepMin
= xStepMin
46 #: 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.
47 self
.stepPhaseShiftIncrement
= stepPhaseShiftIncrement
49 #: 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.
50 self
.windingConnectionAngle
= windingConnectionAngle
52 #: The reactance at the maximum tap step.
53 self
.xStepMax
= xStepMax
55 #: 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.
56 self
.voltageStepIncrementOutOfPhase
= voltageStepIncrementOutOfPhase
58 self
._PhaseVariationCurve
= None
59 self
.PhaseVariationCurve
= PhaseVariationCurve
62 self
.Winding
= Winding
64 self
._TransformerWinding
= None
65 self
.TransformerWinding
= TransformerWinding
67 super(PhaseTapChanger
, self
).__init
__(*args
, **kw_args
)
69 _attrs
= ["phaseTapChangerType", "nominalVoltageOutOfPhase", "xStepMin", "stepPhaseShiftIncrement", "windingConnectionAngle", "xStepMax", "voltageStepIncrementOutOfPhase"]
70 _attr_types
= {"phaseTapChangerType": str, "nominalVoltageOutOfPhase": float, "xStepMin": float, "stepPhaseShiftIncrement": float, "windingConnectionAngle": float, "xStepMax": float, "voltageStepIncrementOutOfPhase": float}
71 _defaults
= {"phaseTapChangerType": "asymmetrical", "nominalVoltageOutOfPhase": 0.0, "xStepMin": 0.0, "stepPhaseShiftIncrement": 0.0, "windingConnectionAngle": 0.0, "xStepMax": 0.0, "voltageStepIncrementOutOfPhase": 0.0}
72 _enums
= {"phaseTapChangerType": "PhaseTapChangerKind"}
73 _refs
= ["PhaseVariationCurve", "Winding", "TransformerWinding"]
76 def getPhaseVariationCurve(self
):
77 """A PhaseTapChanger can have an associated PhaseVariationCurve to define phase shift variations with tap step changes.
79 return self
._PhaseVariationCurve
81 def setPhaseVariationCurve(self
, value
):
82 if self
._PhaseVariationCurve
is not None:
83 self
._PhaseVariationCurve
._PhaseTapChanger
= None
85 self
._PhaseVariationCurve
= value
86 if self
._PhaseVariationCurve
is not None:
87 self
._PhaseVariationCurve
.PhaseTapChanger
= None
88 self
._PhaseVariationCurve
._PhaseTapChanger
= self
90 PhaseVariationCurve
= property(getPhaseVariationCurve
, setPhaseVariationCurve
)
93 """Transformer winding to which this phase tap changer belongs.
97 def setWinding(self
, value
):
98 if self
._Winding
is not None:
99 self
._Winding
._PhaseTapChanger
= None
101 self
._Winding
= value
102 if self
._Winding
is not None:
103 self
._Winding
.PhaseTapChanger
= None
104 self
._Winding
._PhaseTapChanger
= self
106 Winding
= property(getWinding
, setWinding
)
108 def getTransformerWinding(self
):
109 """The transformer winding to which the phase tap changer belongs.
111 return self
._TransformerWinding
113 def setTransformerWinding(self
, value
):
114 if self
._TransformerWinding
is not None:
115 self
._TransformerWinding
._PhaseTapChanger
= None
117 self
._TransformerWinding
= value
118 if self
._TransformerWinding
is not None:
119 self
._TransformerWinding
.PhaseTapChanger
= None
120 self
._TransformerWinding
._PhaseTapChanger
= self
122 TransformerWinding
= property(getTransformerWinding
, setTransformerWinding
)