Skip to content

Commit

Permalink
Power System Stabilizer has work left.
Browse files Browse the repository at this point in the history
  • Loading branch information
gkhalley committed Nov 15, 2023
1 parent ec7f1d4 commit 85d5396
Show file tree
Hide file tree
Showing 25 changed files with 118 additions and 65 deletions.
2 changes: 1 addition & 1 deletion .editix/config.xml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?xml version="1.0" encoding="UTF-8"?><root nodestate="project/examples/nordic-44/CIM_new;project/examples/nordic-44;project/examples;project;project/examples/bus-14"/>
<?xml version="1.0" encoding="UTF-8"?><root nodestate="project"/>
12 changes: 8 additions & 4 deletions .editix/workspace.xml
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@
<param name="xslt.param.name.4" value="time"/>
</file>
<file path="C:\Users\glen\IdeaProjects\XSLTConferencePaper"/>
<file open="true" path="C:\Users\glen\IdeaProjects\XSLTConferencePaper\CIMtoMO4.xsl" type="XSLT">
<file open="false" path="C:\Users\glen\IdeaProjects\XSLTConferencePaper\CIMtoMO4.xsl" type="XSLT">
<param name="xslt.data.file" value="C:\Users\glen\IdeaProjects\XSLTConferencePaper\examples\bus-14\ieee14_EQ.xml"/>
<param name="xslt.xslt.file" value="C:\Users\glen\IdeaProjects\XSLTConferencePaper\CIMtoMO4.xsl"/>
<param name="xslt.fop" value="false"/>
Expand All @@ -317,7 +317,7 @@
<param name="xslt.param.name.2" value="bus"/>
<param name="xslt.param.value.5" value="1.0"/>
<param name="xslt.param.name.0" value="filename"/>
<param name="xslt.param.value.2" value="BUS5__24ee"/>
<param name="xslt.param.value.2" value="BUS5"/>
<param name="xslt.param.name.5" value="time"/>
<param name="xslt.openFile" value="false"/>
<param name="xslt.param.value.1" value="60.0"/>
Expand Down Expand Up @@ -356,7 +356,7 @@
<param name="lastView" value="Source"/>
</file>
<file path="C:\Users\glen\IdeaProjects\XSLTConferencePaper\examples\bus-14"/>
<file open="true" path="C:\Users\glen\IdeaProjects\XSLTConferencePaper\examples\bus-14\ieee14_EQ.xml" type="XML">
<file open="false" path="C:\Users\glen\IdeaProjects\XSLTConferencePaper\examples\bus-14\ieee14_EQ.xml" type="XML">
<param name="lastView" value="Source"/>
</file>
<file open="true" path="C:\Users\glen\IdeaProjects\XSLTConferencePaper\examples\nordic-44\CIM_new\N44_BC_EQ.xml" type="XML">
Expand Down Expand Up @@ -408,7 +408,7 @@
<file open="false" path="C:\Users\glen\IdeaProjects\XSLTConferencePaper\ieee14.mo" type="">
<param name="lastView" value="Source"/>
</file>
<file open="true" path="C:\Users\glen\IdeaProjects\XSLTConferencePaper\examples\bus-14\ieee14_DY.xml" type="XML">
<file open="false" path="C:\Users\glen\IdeaProjects\XSLTConferencePaper\examples\bus-14\ieee14_DY.xml" type="XML">
<param name="lastView" value="Source"/>
</file>
<file path="C:\Users\glen\IdeaProjects\XSLTConferencePaper\imports\dynamics\PowerSystemStabilizerUserDefined.xsl"/>
Expand Down Expand Up @@ -439,4 +439,8 @@
</file>
<file path="C:\Users\glen\IdeaProjects\XSLTConferencePaper\imports\version4\Transformers.xsl"/>
<file path="C:\Users\glen\IdeaProjects\XSLTConferencePaper\imports\version4"/>
<file open="false" path="C:\Users\glen\IdeaProjects\XSLTConferencePaper\imports\dynamics\PSSUserDefined.xsl">
<param name="encoding" value="AUTOMATIC"/>
</file>
<file open="false" path="C:\Users\glen\IdeaProjects\XSLTConferencePaper\imports\dynamics\PssIEEE2B.xsl" type="XSLT"/>
</root>
7 changes: 5 additions & 2 deletions CIMtoMO4.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@
</xsl:otherwise>
</xsl:choose>
</xsl:function>
<xsl:function name="gkh:powerBase" as="xs:double">
<xsl:value-of select="$base * 10*e6"/>
</xsl:function>
<xsl:function name="gkh:baseImpedance" as="xs:double?">
<xsl:param name="basePower" as="xs:double?"/>
<xsl:param name="voltage" as="xs:double?"/>
Expand Down Expand Up @@ -156,8 +159,8 @@ OpenIPSL.Electrical.Events.PwFault Fault (R = </xsl:text>
<xsl:text>
equation
</xsl:text>
<xsl:apply-templates select="cim:Terminal"/>
<xsl:text>// -- Connect fault event:
<xsl:apply-templates select="cim:Terminal"/>
<xsl:text>// -- Connect fault event:

connect(Fault.p, </xsl:text>
<xsl:copy-of select="$bus"/>
Expand Down
2 changes: 1 addition & 1 deletion imports/Lines.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<xsl:output method="text" indent="no"/>
<xsl:template match="cim:ACLineSegment">
<xsl:variable name="baseVoltage" select="gkh:baseVoltage(cim:ConductingEquipment.BaseVoltage/substring(@rdf:resource,2))"/>
<xsl:variable name="baseImpedance" select="gkh:baseImpedance(10002020,$baseVoltage)"/>
<xsl:variable name="baseImpedance" select="gkh:baseImpedance(gkh:powerBase,$baseVoltage)"/>
<xsl:text>OpenIPSL.Electrical.Branches.PwLine </xsl:text>
<xsl:value-of select="gkh:compliantName(concat('L',cim:IdentifiedObject.name))"/>
<xsl:text>(R=</xsl:text>
Expand Down
1 change: 1 addition & 0 deletions imports/Shunts.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<xsl:output method="text" indent="no"/>
<xsl:template match="cim:LinearShuntCompensator">
<xsl:text>OpenIPSL.Electrical.Banks.PSSE.Shunt </xsl:text>
<xsl:value-of select="concat('SH',cim:IdentifiedObject.name)"/>
<xsl:text>(G = </xsl:text>
<xsl:value-of select="format-number(cim:LinearShuntCompensator.gPerSection,'0.0000000000#')"/>
<xsl:text>,B = </xsl:text>
Expand Down
2 changes: 1 addition & 1 deletion imports/dynamics/ExcAC1A.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<xsl:output method="text" indent="no"/>

<xsl:key match="cim:ExcAC1A/cim:ExcitationSystemDynamics.SynchronousMachineDynamics" name="excac1a" use="substring(rdf:resource,2)"/>
<xsl:key match="cim:ExcAC1A/cim:ExcitationSystemDynamics.SynchronousMachineDynamics" name="AC1A-Index" use="substring(rdf:resource,2)"/>

<xsl:template match="cim:ExcAC1A/cim:ExcitationSystemDynamics.SynchronousMachineDynamics"><!-- EXAC1 -->
<xsl:value-of select="../cim:IdentifiedObject.name"/>
Expand Down
2 changes: 1 addition & 1 deletion imports/dynamics/ExcAC2A.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<xsl:output method="text" indent="no"/>

<xsl:key match="cim:ExcAC2A/cim:ExcitationSystemDynamics.SynchronousMachineDynamics" name="excac2a" use="substring(rdf:resource,2)"/>
<xsl:key match="cim:ExcAC2A/cim:ExcitationSystemDynamics.SynchronousMachineDynamics" name="AC2A-Index" use="substring(rdf:resource,2)"/>

<xsl:template match="cim:ExcAC2A/cim:ExcitationSystemDynamic.SynchronousMachineDynamics"><!-- EXAC2 -->
<xsl:value-of select="../cim:IdentifiedObject.name"/>
Expand Down
2 changes: 1 addition & 1 deletion imports/dynamics/ExcIEEEAC1A.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<xsl:output method="text" indent="no"/>

<xsl:key match="cim:ExcIEEEAC1A/cim:ExcitationSystemDynamics.SynchronousMachineDynamics" name="excieeeac1a" use="substring(rdf:resource,2)"/>
<xsl:key match="cim:ExcIEEEAC1A/cim:ExcitationSystemDynamics.SynchronousMachineDynamics" name="IEEEAC1A-Index" use="substring(rdf:resource,2)"/>

<xsl:template match="cim:ExcAC1A/cim:ExcitationSystemDynamics.SynchronousMachineDynamics"><!-- EXAC1 -->
<xsl:value-of select="../cim:IdentifiedObject.name"/>
Expand Down
2 changes: 1 addition & 1 deletion imports/dynamics/ExcIEEEAC2A.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<xsl:output method="text" indent="no"/>

<xsl:key match="cim:ExcIEEEAC2A/cim:ExcitationSystemDynamics.SynchronousMachineDynamics" name="excieeeac2a" use="substring(rdf:resource,2)"/>
<xsl:key match="cim:ExcIEEEAC2A/cim:ExcitationSystemDynamics.SynchronousMachineDynamics" name="IEEEAC2A-Index" use="substring(rdf:resource,2)"/>

<xsl:template match="cim:ExcAC2A/cim:ExcitationSystemDynamic.SynchronousMachineDynamics"><!-- EXAC2 -->
<xsl:value-of select="../cim:IdentifiedObject.name"/>
Expand Down
2 changes: 1 addition & 1 deletion imports/dynamics/ExcIEEEDC1A.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

<xsl:output method="text" indent="no"/>

<xsl:key match="cim:ExcIEEEDC1A/cim:ExcitationSystemDynamics.SynchronousMachineDynamics" name="excieeedc1a" use="substring(rdf:resource,2)"/>
<xsl:key match="cim:ExcIEEEDC1A/cim:ExcitationSystemDynamics.SynchronousMachineDynamics" name="IEEEDC1A-Index" use="substring(rdf:resource,2)"/>

<xsl:template match="cim:ExcIEEEDC1A/cim:ExcitationSystemDynamics.SynchronousMachineDynamics"><!-- ESDC1A -->
<xsl:value-of select="../cim:IdentifiedObject.name"/>
Expand Down
2 changes: 1 addition & 1 deletion imports/dynamics/ExcIEEEST1A.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<xsl:output method="text" indent="no"/>

<xsl:key match="cim:ExcIEEEST1A/cim:ExcitationSystemDynamics.SynchronousMachineDynamics" name="excieeest1a" use="substring(rdf:resource,2)"/>
<xsl:key match="cim:ExcIEEEST1A/cim:ExcitationSystemDynamics.SynchronousMachineDynamics" name="IEEEST1A-Index" use="substring(rdf:resource,2)"/>

<xsl:template match="cim:ExcIEEEST1A/cim:ExcitationSystemDynamics.SynchronousMachineDynamics"><!-- ESST1 -->
<xsl:value-of select="../cim:IdentifiedObject.name"/>
Expand Down
2 changes: 1 addition & 1 deletion imports/dynamics/ExcSCRX.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<xsl:output method="text" indent="no"/>

<xsl:key match="cim:ExcSCRX/cim:ExcitationSystemDynamics.SynchronousMachineDynamics" name="excscrx" use="substring(rdf:resource,2)"/>
<xsl:key match="cim:ExcSCRX/cim:ExcitationSystemDynamics.SynchronousMachineDynamics" name="SCRX-Index" use="substring(rdf:resource,2)"/>

<xsl:template match="cim:ExcSCRX/cim:ExcitationSystemDynamics.SynchronousMachineDynamics">
<xsl:text>OpenIPSL.Electrical.Controls.PSSE.ES.SCRX exciter(T_AT_B = </xsl:text>
Expand Down
2 changes: 1 addition & 1 deletion imports/dynamics/ExcSEXS.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<xsl:output method="text" indent="no"/>

<xsl:key match="cim:ExcSEXS/cim:ExcitationSystemDynamics.SynchronousMachineDynamics" name="excsexs" use="substring(rdf:resource,2)"/>
<xsl:key match="cim:ExcSEXS/cim:ExcitationSystemDynamics.SynchronousMachineDynamics" name="SEXS-Index" use="substring(rdf:resource,2)"/>

<xsl:template match="cim:ExcSEXS/cim:ExcitationSystemDynamics.SynchronousMachineDynamics"><!-- SEXS -->
<xsl:value-of select="../cim:IdentifiedObject.name"/>
Expand Down
26 changes: 26 additions & 0 deletions imports/dynamics/ExcUserDefined.xsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8" ?>

<!-- New XSLT document created with EditiX XML Editor (http://www.editix.com) at Tues Nov 14 18:07:00 CDT 2023 -->

<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:fn="http://www.w3.org/2005/xpath-functions"
xmlns:xdt="http://www.w3.org/2005/xpath-datatypes"
xmlns:err="http://www.w3.org/2005/xqt-errors"
xmlns:cim="http://iec.ch/TC57/2013/CIM-schema-cim16#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
exclude-result-prefixes="xs xdt err fn">

<xsl:output method="text" indent="no"/>


<xsl:key match="cim:ExcitationSystemUserDefined/cim:ExcitationSystemDynamics.SynchronousMachineDynamics" name="ExcUser-Index" use="substring(@rdf:resource,2)"/>


<xsl:template match="cim:ExcitationSystemUserDefined/cim:ExcitationSystemDynamics.SynchronousMachineDynamics">
<xsl:value-of select="../cim:IdentifiedObject.name"/><xsl:text> exciter (</xsl:text>
<xsl:apply-templates select="key('ExcSys-Index',../@rdf:ID)"/>
</xsl:template>

</xsl:stylesheet>
2 changes: 1 addition & 1 deletion imports/dynamics/GovGAST.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<xsl:output method="text" indent="no"/>

<xsl:key match="cim:GovGAST/cim:TurbineGovernorDynamics.SynchronousMachineDynamics" name="governorGAST" use="substring(@rdf:resource,2)"/>
<xsl:key match="cim:GovGAST/cim:TurbineGovernorDynamics.SynchronousMachineDynamics" name="GovGAST-Index" use="substring(@rdf:resource,2)"/>

<xsl:template match="cim:GovGAST/cim:TurbineGovernorDynamics.SynchronousMachineDynamics">
<xsl:text>OpenIPSL.Electrical.Controls.PSSE.TG.GAST governor(R = </xsl:text>
Expand Down
2 changes: 1 addition & 1 deletion imports/dynamics/GovHydro1.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<xsl:output method="text" indent="no"/>

<xsl:key match="cim:GovHydro1/cim:TurbineGovernorDynamics.SynchronousMachineDynamics" name="governorHydro1" use="substring(@rdf:resource,2)"/>
<xsl:key match="cim:GovHydro1/cim:TurbineGovernorDynamics.SynchronousMachineDynamics" name="Hydro1-Index" use="substring(@rdf:resource,2)"/>

<xsl:template match="cim:GovHydro1/cim:TurbineGovernorDynamics.SynchronousMachineDynamics">
<xsl:text>OpenIPSL.Electrical.Controls.PSSE.TG.HYGOV governor(R = </xsl:text>
Expand Down
2 changes: 1 addition & 1 deletion imports/dynamics/GovSteam0.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<xsl:output method="text" indent="no"/>

<xsl:key match="cim:GovSteam0/cim:TurbineGovernorDynamics.SynchronousMachineDynamics" name="governor" use="substring(@rdf:resource,2)"/>
<xsl:key match="cim:GovSteam0/cim:TurbineGovernorDynamics.SynchronousMachineDynamics" name="TGOV1-Index" use="substring(@rdf:resource,2)"/>

<xsl:template match="cim:GovSteam0/cim:TurbineGovernorDynamics.SynchronousMachineDynamics">
<xsl:text>OpenIPSL.Electrical.Controls.PSSE.TG.TGOV1 governor(R = </xsl:text>
Expand Down
2 changes: 1 addition & 1 deletion imports/dynamics/GovSteamSGO.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<xsl:output method="text" indent="no"/>

<xsl:key match="cim:GovSteamSGO/cim:TurbineGovernorDynamics.SynchronousMachineDynamics" name="governorSG" use="substring(@rdf:resource,2)"/>
<xsl:key match="cim:GovSteamSGO/cim:TurbineGovernorDynamics.SynchronousMachineDynamics" name="GovSG-Index" use="substring(@rdf:resource,2)"/>

<xsl:template match="cim:GovSteamSGO/cim:TurbineGovernorDynamics.SynchronousMachineDynamics">
<xsl:text>OpenIPSL.Electrical.Controls.PSSE.TG.IEESGO governor(T_1 = </xsl:text>
Expand Down
26 changes: 26 additions & 0 deletions imports/dynamics/PSSUserDefined.xsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8" ?>

<!-- New XSLT document created with EditiX XML Editor (http://www.editix.com) at Sun Mar 27 13:52:00 CDT 2022 -->

<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:fn="http://www.w3.org/2005/xpath-functions"
xmlns:xdt="http://www.w3.org/2005/xpath-datatypes"
xmlns:err="http://www.w3.org/2005/xqt-errors"
xmlns:cim="http://iec.ch/TC57/2013/CIM-schema-cim16#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
exclude-result-prefixes="xs xdt err fn">

<xsl:output method="text" indent="no"/>


<xsl:key match="cim:PowerSystemStabilizerUserDefined/cim:PowerSystemStabilizerDynamics.ExcitationSystemDynamics" name="PSSUser-Index" use="substring(@rdf:resource,2)"/>

<xsl:template match="cim:PowerSystemStabilizerUserDefined/cim:PowerSystemStabilizerDynamics.ExcitationSystemDynamics">
<xsl:text>
OpenIPSL.Electrical.Controls.PSSE.PSS.STAB2A pss(</xsl:text>
<xsl:apply-templates select="key('PSSsys-Index',@rdf:ID)"/>
</xsl:template>

</xsl:stylesheet>
4 changes: 2 additions & 2 deletions imports/dynamics/ProprietaryParameterDynamics.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

<xsl:output method="text" indent="no"/>

<xsl:key match="cim:ProprietaryParameterDynamics/cim:ProprietaryParameterDynamics.ExcitationSystemUserDefined" name="ppdynamics" use="substring(@rdf:resource,2)"/>
<xsl:key match="cim:ExcitationSystemUserDefined/cim:ExcitationSystemDynamics.SynchronousMachineDynamics" name="execsysuser" use="substring(@rdf:resource,2)"/>
<xsl:key match="cim:ProprietaryParameterDynamics/cim:ProprietaryParameterDynamics.PowerSystemStabilizerUserDefined" name="PSSsys-Index" use="substring(@rdf:resource,2)"/>
<xsl:key match="cim:ProprietaryParameterDynamics/cim:ProprietaryParameterDynamics.ExcitationSystemUserDefined" name="ExcSys-Index" use="substring(@rdf:resource,2)"/>

<xsl:template match="cim:ProprietaryParameterDynamics/cim:ProprietaryParameterDynamics.PowerSystemStabilizerUserDefined">
<xsl:if test="../cim:ProprietaryParameterDynamics.parameterNumber='0'">
Expand Down
2 changes: 1 addition & 1 deletion imports/dynamics/PssIEEE2B.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<xsl:output method="text" indent="no"/>

<xsl:key match="cim:PssIEEE2B/cim:PowerSystemStabilizerDynamics.ExcitationSystemDynamics" name="pssieee2b" use="substring(@rdf:resource,2)"/>
<xsl:key match="cim:PssIEEE2B/cim:PowerSystemStabilizerDynamics.ExcitationSystemDynamics" name="PSS2B-Index" use="substring(@rdf:resource,2)"/>

<xsl:template match="cim:PssIEEE2B/cim:PowerSystemStabilizerDynamics.ExcitationSystemDynamics">
<xsl:text>
Expand Down
Loading

0 comments on commit 85d5396

Please sign in to comment.