<?xml version="1.0" standalone="no"?>
<!DOCTYPE entity PUBLIC "-//UC Berkeley//DTD MoML 1//EN"
    "http://ptolemy.eecs.berkeley.edu/xml/dtd/MoML_1.dtd">
<entity name="PID test" class="ptolemy.actor.TypedCompositeActor">
    <property name="_createdBy" class="ptolemy.kernel.attributes.VersionAttribute" value="6.0.beta">
    </property>
    <property name="CT Director" class="ptolemy.domains.ct.kernel.CTMixedSignalDirector">
        <property name="stopTime" class="ptolemy.data.expr.Parameter" value="10">
        </property>
        <property name="ODESolver" class="ptolemy.data.expr.Parameter" value="&quot;ExplicitRK23Solver&quot;">
        </property>
        <property name="_location" class="ptolemy.kernel.util.Location" value="[75.0, 50.0]">
        </property>
    </property>
    <property name="_windowProperties" class="ptolemy.actor.gui.WindowPropertiesAttribute" value="{bounds={98, 74, 798, 457}, maximized=false}">
    </property>
    <property name="_vergilSize" class="ptolemy.actor.gui.SizeAttribute" value="[583, 350]">
    </property>
    <property name="_vergilZoomFactor" class="ptolemy.data.expr.ExpertParameter" value="1.0682240509689">
    </property>
    <property name="_vergilCenter" class="ptolemy.data.expr.ExpertParameter" value="{284.882828031809, 180.9483101391649}">
    </property>
    <entity name="Const" class="ptolemy.actor.lib.Const">
        <property name="value" class="ptolemy.data.expr.Parameter" value="50">
        </property>
        <doc>Create a constant sequence.</doc>
        <property name="_icon" class="ptolemy.vergil.icon.BoxedValueIcon">
            <property name="attributeName" class="ptolemy.kernel.util.StringAttribute" value="value">
            </property>
            <property name="displayWidth" class="ptolemy.data.expr.Parameter" value="60">
            </property>
        </property>
        <property name="_location" class="ptolemy.kernel.util.Location" value="[65.0, 130.0]">
        </property>
    </entity>
    <entity name="TimedPlotter" class="ptolemy.actor.lib.gui.TimedPlotter">
        <property name="legend" class="ptolemy.kernel.util.StringAttribute" value="CO, PV">
        </property>
        <property name="_windowProperties" class="ptolemy.actor.gui.WindowPropertiesAttribute" value="{bounds={486, 365, 508, 348}, maximized=false}">
        </property>
        <property name="_plotSize" class="ptolemy.actor.gui.SizeAttribute" value="[500, 300]">
        </property>
        <property name="_location" class="ptolemy.kernel.util.Location" value="[350.0, 300.0]">
        </property>
        <configure>
<?plotml <!DOCTYPE plot PUBLIC "-//UC Berkeley//DTD PlotML 1//EN"
"http://ptolemy.eecs.berkeley.edu/xml/dtd/PlotML_1.dtd">
<plot>
<title>TimedPlotter</title>
<xRange min="0.0" max="10.0"/>
<yRange min="0.0" max="100.0"/>
</plot>?>
        </configure>
    </entity>
    <entity name="PID_controller" class="ptolemy.actor.TypedCompositeActor">
        <property name="_createdBy" class="ptolemy.kernel.attributes.VersionAttribute" value="6.0.beta">
        </property>
        <property name="_windowProperties" class="ptolemy.actor.gui.WindowPropertiesAttribute" value="{bounds={-4, -4, 1032, 748}, maximized=true}">
        </property>
        <property name="_vergilSize" class="ptolemy.actor.gui.SizeAttribute" value="[994, 878]">
        </property>
        <property name="_vergilZoomFactor" class="ptolemy.data.expr.ExpertParameter" value="1.2019347037485">
        </property>
        <property name="_vergilCenter" class="ptolemy.data.expr.ExpertParameter" value="{125.5000000000001, 622.3694668008047}">
        </property>
        <property name="Annotation" class="ptolemy.vergil.kernel.attributes.TextAttribute">
            <property name="text" class="ptolemy.kernel.util.StringAttribute" value="PID Controller (discrete, velocity mode)&#10;&#10;This Proportional-Integral-Derivative controller implements a velocity mode&#10;calculation of the P, I and D elements based on the idealised industrial &#10;PID structure.  That is, the Gain multiplies all terms in the controller,&#10;and the Derivative action is based on an backward-step approximation of&#10;the pure derivative of the PV (i.e. no filtering).">
            </property>
            <property name="_location" class="ptolemy.kernel.util.Location" value="{-110.0, 260.0}">
            </property>
        </property>
        <property name="gain" class="ptolemy.data.expr.Parameter" value="3">
            <property name="_hideName" class="ptolemy.kernel.util.SingletonAttribute">
            </property>
            <property name="_icon" class="ptolemy.vergil.icon.ValueIcon">
                <property name="_color" class="ptolemy.actor.gui.ColorAttribute" value="{0.0, 0.0, 1.0, 1.0}">
                </property>
            </property>
            <property name="_smallIconDescription" class="ptolemy.kernel.util.SingletonConfigurableAttribute">
                <configure>
      <svg>
        <text x="20" style="font-size:14; font-family:SansSerif; fill:blue" y="20">-P-</text>
      </svg>
    </configure>
            </property>
            <property name="_editorFactory" class="ptolemy.vergil.toolbox.VisibleParameterEditorFactory">
            </property>
            <property name="_location" class="ptolemy.kernel.util.Location" value="{-280, 345}">
            </property>
        </property>
        <property name="integral" class="ptolemy.data.expr.Parameter" value="3">
            <property name="_hideName" class="ptolemy.kernel.util.SingletonAttribute">
            </property>
            <property name="_icon" class="ptolemy.vergil.icon.ValueIcon">
                <property name="_color" class="ptolemy.actor.gui.ColorAttribute" value="{0.0, 0.0, 1.0, 1.0}">
                </property>
            </property>
            <property name="_smallIconDescription" class="ptolemy.kernel.util.SingletonConfigurableAttribute">
                <configure>
      <svg>
        <text x="20" style="font-size:14; font-family:SansSerif; fill:blue" y="20">-P-</text>
      </svg>
    </configure>
            </property>
            <property name="_editorFactory" class="ptolemy.vergil.toolbox.VisibleParameterEditorFactory">
            </property>
            <property name="_location" class="ptolemy.kernel.util.Location" value="[-280.0, 365.0]">
            </property>
        </property>
        <property name="derivative" class="ptolemy.data.expr.Parameter" value="0.1">
            <property name="_hideName" class="ptolemy.kernel.util.SingletonAttribute">
            </property>
            <property name="_icon" class="ptolemy.vergil.icon.ValueIcon">
                <property name="_color" class="ptolemy.actor.gui.ColorAttribute" value="{0.0, 0.0, 1.0, 1.0}">
                </property>
            </property>
            <property name="_smallIconDescription" class="ptolemy.kernel.util.SingletonConfigurableAttribute">
                <configure>
      <svg>
        <text x="20" style="font-size:14; font-family:SansSerif; fill:blue" y="20">-P-</text>
      </svg>
    </configure>
            </property>
            <property name="_editorFactory" class="ptolemy.vergil.toolbox.VisibleParameterEditorFactory">
            </property>
            <property name="_location" class="ptolemy.kernel.util.Location" value="[-280.0, 385.0]">
            </property>
        </property>
        <property name="_location" class="ptolemy.kernel.util.Location" value="[300.0, 130.0]">
        </property>
        <property name="dT" class="ptolemy.data.expr.Parameter" value="0.1">
            <property name="_hideName" class="ptolemy.kernel.util.SingletonAttribute">
            </property>
            <property name="_icon" class="ptolemy.vergil.icon.ValueIcon">
                <property name="_color" class="ptolemy.actor.gui.ColorAttribute" value="{0.0, 0.0, 1.0, 1.0}">
                </property>
            </property>
            <property name="_smallIconDescription" class="ptolemy.kernel.util.SingletonConfigurableAttribute">
                <configure>
      <svg>
        <text x="20" style="font-size:14; font-family:SansSerif; fill:blue" y="20">-P-</text>
      </svg>
    </configure>
            </property>
            <property name="_editorFactory" class="ptolemy.vergil.toolbox.VisibleParameterEditorFactory">
            </property>
            <property name="_location" class="ptolemy.kernel.util.Location" value="[-280.0, 410.0]">
            </property>
        </property>
        <property name="DE Director" class="ptolemy.domains.de.kernel.DEDirector">
            <property name="_location" class="ptolemy.kernel.util.Location" value="{-210, 300}">
            </property>
        </property>
        <port name="SP" class="ptolemy.actor.TypedIOPort">
            <property name="input"/>
            <property name="_location" class="ptolemy.kernel.util.Location" value="[-245.0, 485.0]">
            </property>
        </port>
        <port name="PV" class="ptolemy.actor.TypedIOPort">
            <property name="input"/>
            <property name="_location" class="ptolemy.kernel.util.Location" value="[-245.0, 530.0]">
            </property>
        </port>
        <port name="CO" class="ptolemy.actor.TypedIOPort">
            <property name="output"/>
            <property name="_location" class="ptolemy.kernel.util.Location" value="[475.0, 800.0]">
            </property>
        </port>
        <entity name="Expression" class="ptolemy.actor.lib.Expression">
            <property name="expression" class="ptolemy.kernel.util.StringAttribute" value="-gain*(dPV+integral*error*dT+derivative*ddPV/dT)">
            </property>
            <property name="_icon" class="ptolemy.vergil.icon.BoxedValueIcon">
                <property name="attributeName" class="ptolemy.kernel.util.StringAttribute" value="expression">
                </property>
                <property name="displayWidth" class="ptolemy.data.expr.Parameter" value="60">
                </property>
            </property>
            <property name="_location" class="ptolemy.kernel.util.Location" value="[210.0, 625.0]">
            </property>
            <port name="output" class="ptolemy.actor.TypedIOPort">
                <property name="output"/>
                <property name="_type" class="ptolemy.actor.TypeAttribute" value="double">
                </property>
            </port>
            <port name="error" class="ptolemy.actor.TypedIOPort">
                <property name="input"/>
            </port>
            <port name="dPV" class="ptolemy.actor.TypedIOPort">
                <property name="input"/>
            </port>
            <port name="ddPV" class="ptolemy.actor.TypedIOPort">
                <property name="input"/>
            </port>
            <port name="dT" class="ptolemy.actor.TypedIOPort">
                <property name="input"/>
                <property name="_hide" class="ptolemy.data.expr.SingletonParameter" value="true">
                </property>
            </port>
        </entity>
        <entity name="dPV" class="ptolemy.actor.lib.Differential">
            <property name="_location" class="ptolemy.kernel.util.Location" value="[-150.0, 570.0]">
            </property>
            <port name="input" class="ptolemy.actor.TypedIOPort">
                <property name="input"/>
                <property name="_type" class="ptolemy.actor.TypeAttribute" value="double">
                </property>
            </port>
            <port name="output" class="ptolemy.actor.TypedIOPort">
                <property name="output"/>
                <property name="_type" class="ptolemy.actor.TypeAttribute" value="double">
                </property>
            </port>
        </entity>
        <entity name="AddSubtract" class="ptolemy.actor.lib.AddSubtract">
            <property name="_location" class="ptolemy.kernel.util.Location" value="[-135.0, 475.0]">
            </property>
            <port name="plus" class="ptolemy.actor.TypedIOPort">
                <property name="input"/>
                <property name="multiport"/>
                <property name="_type" class="ptolemy.actor.TypeAttribute" value="double">
                </property>
            </port>
            <port name="minus" class="ptolemy.actor.TypedIOPort">
                <property name="input"/>
                <property name="multiport"/>
                <property name="_type" class="ptolemy.actor.TypeAttribute" value="double">
                </property>
            </port>
            <port name="output" class="ptolemy.actor.TypedIOPort">
                <property name="output"/>
                <property name="_type" class="ptolemy.actor.TypeAttribute" value="double">
                </property>
            </port>
        </entity>
        <entity name="ddPV" class="ptolemy.actor.lib.Differential">
            <property name="_location" class="ptolemy.kernel.util.Location" value="[-25.0, 655.0]">
            </property>
        </entity>
        <entity name="Accumulator" class="ptolemy.actor.lib.Accumulator">
            <property name="_location" class="ptolemy.kernel.util.Location" value="[225.0, 800.0]">
            </property>
        </entity>
        <entity name="Limiter" class="ptolemy.actor.lib.Limiter">
            <property name="bottom" class="ptolemy.data.expr.Parameter" value="0">
            </property>
            <property name="top" class="ptolemy.data.expr.Parameter" value="100">
            </property>
            <property name="_location" class="ptolemy.kernel.util.Location" value="[325.0, 800.0]">
            </property>
        </entity>
        <entity name="AddSubtract2" class="ptolemy.actor.lib.AddSubtract">
            <property name="_location" class="ptolemy.kernel.util.Location" value="[310.0, 910.0]">
            </property>
            <property name="_flipPortsHorizontal" class="ptolemy.data.expr.Parameter" value="true">
            </property>
            <property name="_flipPortsVertical" class="ptolemy.data.expr.Parameter" value="false">
            </property>
            <port name="plus" class="ptolemy.actor.TypedIOPort">
                <property name="input"/>
                <property name="multiport"/>
                <property name="_type" class="ptolemy.actor.TypeAttribute" value="double">
                </property>
            </port>
            <port name="minus" class="ptolemy.actor.TypedIOPort">
                <property name="input"/>
                <property name="multiport"/>
                <property name="_type" class="ptolemy.actor.TypeAttribute" value="double">
                </property>
            </port>
            <port name="output" class="ptolemy.actor.TypedIOPort">
                <property name="output"/>
                <property name="_type" class="ptolemy.actor.TypeAttribute" value="double">
                </property>
            </port>
        </entity>
        <entity name="TimedDelay" class="ptolemy.domains.de.lib.TimedDelay">
            <property name="delay" class="ptolemy.data.expr.Parameter" value="dT">
            </property>
            <property name="TimedDelayIcon" class="ptolemy.vergil.icon.EditorIcon">
                <property name="rectangle" class="ptolemy.vergil.kernel.attributes.RectangleAttribute">
                    <property name="_location" class="ptolemy.kernel.util.Location" value="{0, 0}">
                    </property>
                    <property name="width" class="ptolemy.data.expr.Parameter" value="60">
                    </property>
                    <property name="height" class="ptolemy.data.expr.Parameter" value="40">
                    </property>
                    <property name="centered" class="ptolemy.data.expr.Parameter" value="true">
                    </property>
                    <property name="fillColor" class="ptolemy.actor.gui.ColorAttribute" value="{1.0, 1.0, 1.0, 1.0}">
                    </property>
                </property>
                <property name="_windowProperties" class="ptolemy.actor.gui.WindowPropertiesAttribute" value="{bounds={137, 109, 815, 518}, maximized=false}">
                </property>
                <property name="_vergilSize" class="ptolemy.actor.gui.SizeAttribute" value="[600, 400]">
                </property>
                <property name="_vergilZoomFactor" class="ptolemy.data.expr.ExpertParameter" value="4.0">
                </property>
                <property name="_vergilCenter" class="ptolemy.data.expr.ExpertParameter" value="{0.0, 0.0}">
                </property>
                <property name="Annotation" class="ptolemy.vergil.kernel.attributes.TextAttribute">
                    <property name="textSize" class="ptolemy.data.expr.Parameter" value="11">
                    </property>
                    <property name="textColor" class="ptolemy.actor.gui.ColorAttribute" value="{0.0,0.0,0.0,1.0}">
                    </property>
                    <property name="text" class="ptolemy.kernel.util.StringAttribute" value="delay of">
                    </property>
                    <property name="_location" class="ptolemy.kernel.util.Location" value="[-23.0, -16.0]">
                    </property>
                </property>
                <property name="ParameterValue" class="ptolemy.vergil.kernel.attributes.AttributeValueAttribute">
                    <property name="attributeName" class="ptolemy.kernel.util.StringAttribute" value="delay">
                    </property>
                    <property name="displayWidth" class="ptolemy.data.expr.Parameter" value="6">
                    </property>
                    <property name="_location" class="ptolemy.kernel.util.Location" value="[-14.0, -2.0]">
                    </property>
                </property>
            </property>
            <property name="_location" class="ptolemy.kernel.util.Location" value="[205.0, 870.0]">
            </property>
            <property name="_flipPortsHorizontal" class="ptolemy.data.expr.Parameter" value="true">
            </property>
        </entity>
        <relation name="relation2" class="ptolemy.actor.TypedIORelation">
            <property name="width" class="ptolemy.data.expr.Parameter" value="1">
            </property>
            <vertex name="vertex1" value="[-195.0, 530.0]">
            </vertex>
        </relation>
        <relation name="relation4" class="ptolemy.actor.TypedIORelation">
            <property name="width" class="ptolemy.data.expr.Parameter" value="1">
            </property>
            <vertex name="vertex1" value="[-70.0, 495.0]">
            </vertex>
        </relation>
        <relation name="relation6" class="ptolemy.actor.TypedIORelation">
            <property name="width" class="ptolemy.data.expr.Parameter" value="1">
            </property>
            <vertex name="vertex1" value="[-15.0, 615.0]">
            </vertex>
        </relation>
        <relation name="relation8" class="ptolemy.actor.TypedIORelation">
            <property name="width" class="ptolemy.data.expr.Parameter" value="1">
            </property>
        </relation>
        <relation name="relation13" class="ptolemy.actor.TypedIORelation">
            <property name="width" class="ptolemy.data.expr.Parameter" value="1">
            </property>
            <vertex name="vertex1" value="[155.0, 705.0]">
            </vertex>
        </relation>
        <relation name="relation5" class="ptolemy.actor.TypedIORelation">
            <property name="width" class="ptolemy.data.expr.Parameter" value="1">
            </property>
            <vertex name="vertex1" value="[-105.0, 611.5625]">
            </vertex>
        </relation>
        <relation name="relation10" class="ptolemy.actor.TypedIORelation">
            <property name="width" class="ptolemy.data.expr.Parameter" value="1">
            </property>
            <vertex name="vertex1" value="[-215.0, 485.0]">
            </vertex>
        </relation>
        <relation name="relation9" class="ptolemy.actor.TypedIORelation">
            <property name="width" class="ptolemy.data.expr.Parameter" value="1">
            </property>
            <vertex name="vertex1" value="[380.0, 800.0]">
            </vertex>
        </relation>
        <relation name="relation14" class="ptolemy.actor.TypedIORelation">
            <property name="width" class="ptolemy.data.expr.Parameter" value="1">
            </property>
            <vertex name="vertex1" value="[275.0, 800.0]">
            </vertex>
        </relation>
        <relation name="relation7" class="ptolemy.actor.TypedIORelation">
            <property name="width" class="ptolemy.data.expr.Parameter" value="1">
            </property>
        </relation>
        <relation name="relation" class="ptolemy.actor.TypedIORelation">
            <property name="width" class="ptolemy.data.expr.Parameter" value="1">
            </property>
        </relation>
        <link port="SP" relation="relation10"/>
        <link port="PV" relation="relation2"/>
        <link port="CO" relation="relation9"/>
        <link port="Expression.output" relation="relation13"/>
        <link port="Expression.error" relation="relation4"/>
        <link port="Expression.dPV" relation="relation6"/>
        <link port="Expression.ddPV" relation="relation8"/>
        <link port="dPV.input" relation="relation2"/>
        <link port="dPV.output" relation="relation5"/>
        <link port="AddSubtract.plus" relation="relation2"/>
        <link port="AddSubtract.minus" relation="relation10"/>
        <link port="AddSubtract.output" relation="relation4"/>
        <link port="ddPV.input" relation="relation6"/>
        <link port="ddPV.output" relation="relation8"/>
        <link port="Accumulator.input" relation="relation13"/>
        <link port="Accumulator.input" relation="relation"/>
        <link port="Accumulator.output" relation="relation14"/>
        <link port="Limiter.input" relation="relation14"/>
        <link port="Limiter.output" relation="relation9"/>
        <link port="AddSubtract2.plus" relation="relation9"/>
        <link port="AddSubtract2.minus" relation="relation14"/>
        <link port="AddSubtract2.output" relation="relation7"/>
        <link port="TimedDelay.input" relation="relation7"/>
        <link port="TimedDelay.output" relation="relation"/>
        <link relation1="relation6" relation2="relation5"/>
    </entity>
    <entity name="PeriodicSampler" class="ptolemy.domains.ct.lib.CTPeriodicSampler">
        <property name="samplePeriod" class="ptolemy.data.expr.Parameter" value="0.1">
        </property>
        <property name="_location" class="ptolemy.kernel.util.Location" value="[170.0, 135.0]">
        </property>
    </entity>
    <entity name="ZeroOrderHold" class="ptolemy.domains.ct.lib.ZeroOrderHold">
        <property name="_location" class="ptolemy.kernel.util.Location" value="[415.0, 130.0]">
        </property>
    </entity>
    <entity name="FOPDT" class="ptolemy.domains.ct.kernel.CTCompositeActor">
        <property name="_location" class="ptolemy.kernel.util.Location" value="[320.0, 205.0]">
        </property>
        <property name="TimeConstant" class="ptolemy.data.expr.Parameter" value="1">
            <property name="_hideName" class="ptolemy.kernel.util.SingletonAttribute">
            </property>
            <property name="_icon" class="ptolemy.vergil.icon.ValueIcon">
                <property name="_color" class="ptolemy.actor.gui.ColorAttribute" value="{0.0, 0.0, 1.0, 1.0}">
                </property>
            </property>
            <property name="_smallIconDescription" class="ptolemy.kernel.util.SingletonConfigurableAttribute">
                <configure>
      <svg>
        <text x="20" style="font-size:14; font-family:SansSerif; fill:blue" y="20">-P-</text>
      </svg>
    </configure>
            </property>
            <property name="_editorFactory" class="ptolemy.vergil.toolbox.VisibleParameterEditorFactory">
            </property>
            <property name="_location" class="ptolemy.kernel.util.Location" value="{45.0, 135.0}">
            </property>
        </property>
        <property name="InitialValue" class="ptolemy.data.expr.Parameter" value="0">
            <property name="_hideName" class="ptolemy.kernel.util.SingletonAttribute">
            </property>
            <property name="_icon" class="ptolemy.vergil.icon.ValueIcon">
                <property name="_color" class="ptolemy.actor.gui.ColorAttribute" value="{0.0, 0.0, 1.0, 1.0}">
                </property>
            </property>
            <property name="_smallIconDescription" class="ptolemy.kernel.util.SingletonConfigurableAttribute">
                <configure>
      <svg>
        <text x="20" style="font-size:14; font-family:SansSerif; fill:blue" y="20">-P-</text>
      </svg>
    </configure>
            </property>
            <property name="_editorFactory" class="ptolemy.vergil.toolbox.VisibleParameterEditorFactory">
            </property>
            <property name="_location" class="ptolemy.kernel.util.Location" value="{45.0, 155.0}">
            </property>
        </property>
        <property name="TimeResolution" class="ptolemy.data.expr.Parameter" value="0.01">
            <property name="_hideName" class="ptolemy.kernel.util.SingletonAttribute">
            </property>
            <property name="_icon" class="ptolemy.vergil.icon.ValueIcon">
                <property name="_color" class="ptolemy.actor.gui.ColorAttribute" value="{0.0, 0.0, 1.0, 1.0}">
                </property>
            </property>
            <property name="_smallIconDescription" class="ptolemy.kernel.util.SingletonConfigurableAttribute">
                <configure>
      <svg>
        <text x="20" style="font-size:14; font-family:SansSerif; fill:blue" y="20">-P-</text>
      </svg>
    </configure>
            </property>
            <property name="_editorFactory" class="ptolemy.vergil.toolbox.VisibleParameterEditorFactory">
            </property>
            <property name="_location" class="ptolemy.kernel.util.Location" value="{45.0, 175.0}">
            </property>
        </property>
        <property name="deadtime" class="ptolemy.data.expr.Parameter" value="0.1">
            <property name="_hideName" class="ptolemy.kernel.util.SingletonAttribute">
            </property>
            <property name="_icon" class="ptolemy.vergil.icon.ValueIcon">
                <property name="_color" class="ptolemy.actor.gui.ColorAttribute" value="{0.0, 0.0, 1.0, 1.0}">
                </property>
            </property>
            <property name="_smallIconDescription" class="ptolemy.kernel.util.SingletonConfigurableAttribute">
                <configure>
      <svg>
        <text x="20" style="font-size:14; font-family:SansSerif; fill:blue" y="20">-P-</text>
      </svg>
    </configure>
            </property>
            <property name="_editorFactory" class="ptolemy.vergil.toolbox.VisibleParameterEditorFactory">
            </property>
            <property name="_location" class="ptolemy.kernel.util.Location" value="{45.0, 115.0}">
            </property>
        </property>
        <property name="gain" class="ptolemy.data.expr.Parameter" value="1">
            <property name="_hideName" class="ptolemy.kernel.util.SingletonAttribute">
            </property>
            <property name="_icon" class="ptolemy.vergil.icon.ValueIcon">
                <property name="_color" class="ptolemy.actor.gui.ColorAttribute" value="{0.0, 0.0, 1.0, 1.0}">
                </property>
            </property>
            <property name="_smallIconDescription" class="ptolemy.kernel.util.SingletonConfigurableAttribute">
                <configure>
      <svg>
        <text x="20" style="font-size:14; font-family:SansSerif; fill:blue" y="20">-P-</text>
      </svg>
    </configure>
            </property>
            <property name="_editorFactory" class="ptolemy.vergil.toolbox.VisibleParameterEditorFactory">
            </property>
            <property name="_location" class="ptolemy.kernel.util.Location" value="{45.0, 95.0}">
            </property>
        </property>
        <property name="Integrating" class="ptolemy.data.expr.Parameter" value="false">
            <property name="_hideName" class="ptolemy.kernel.util.SingletonAttribute">
            </property>
            <property name="_icon" class="ptolemy.vergil.icon.ValueIcon">
                <property name="_color" class="ptolemy.actor.gui.ColorAttribute" value="{0.0, 0.0, 1.0, 1.0}">
                </property>
            </property>
            <property name="_smallIconDescription" class="ptolemy.kernel.util.SingletonConfigurableAttribute">
                <configure>
      <svg>
        <text x="20" style="font-size:14; font-family:SansSerif; fill:blue" y="20">-P-</text>
      </svg>
    </configure>
            </property>
            <property name="_editorFactory" class="ptolemy.vergil.toolbox.VisibleParameterEditorFactory">
            </property>
            <property name="_location" class="ptolemy.kernel.util.Location" value="{45.0, 195.0}">
            </property>
        </property>
        <property name="Annotation" class="ptolemy.vergil.kernel.attributes.TextAttribute">
            <property name="text" class="ptolemy.kernel.util.StringAttribute" value="First-Order Plus DeadTime (FOPDT) model of dynamics&#10;&#10;A TimeResolution needs to be set to determine the resolution of the deadtime.&#10;The block can also be set to integrating mode, where the dynamics then include&#10;the deadtime, timeconstant and integrator.">
            </property>
            <property name="_location" class="ptolemy.kernel.util.Location" value="{310.0, 50.0}">
            </property>
        </property>
        <property name="_icon" class="ptolemy.vergil.icon.EditorIcon">
            <property name="polygon" class="ptolemy.vergil.kernel.attributes.ResizablePolygonAttribute">
                <property name="_location" class="ptolemy.kernel.util.Location" value="[-11.0, -10.0]">
                </property>
                <property name="width" class="ptolemy.data.expr.Parameter" value="38.0">
                </property>
                <property name="height" class="ptolemy.data.expr.Parameter" value="20.0">
                </property>
                <property name="centered" class="ptolemy.data.expr.Parameter" value="true">
                </property>
                <property name="fillColor" class="ptolemy.actor.gui.ColorAttribute" value="{1.0,0.0,0.0,1.0}">
                </property>
                <property name="vertices" class="ptolemy.data.expr.Parameter" value="{0.0, 0.0, 20.0, 0.0, 5.0, 20.0, -15.0, 20.0}">
                </property>
            </property>
            <property name="ellipse" class="ptolemy.vergil.kernel.attributes.EllipseAttribute">
                <property name="_location" class="ptolemy.kernel.util.Location" value="[13.0, 0.0]">
                </property>
                <property name="lineColor" class="ptolemy.actor.gui.ColorAttribute" value="{0.0,0.0,0.0,1.0}">
                </property>
                <property name="width" class="ptolemy.data.expr.Parameter" value="33.0">
                </property>
                <property name="height" class="ptolemy.data.expr.Parameter" value="32.0">
                </property>
                <property name="centered" class="ptolemy.data.expr.Parameter" value="true">
                </property>
                <property name="fillColor" class="ptolemy.actor.gui.ColorAttribute" value="{0.2,1.0,0.0,1.0}">
                </property>
            </property>
            <property name="rectangle" class="ptolemy.vergil.kernel.attributes.RectangleAttribute">
                <property name="_location" class="ptolemy.kernel.util.Location" value="[-17.0, 10.0]">
                </property>
                <property name="width" class="ptolemy.data.expr.Parameter" value="26.0">
                </property>
                <property name="height" class="ptolemy.data.expr.Parameter" value="20.0">
                </property>
                <property name="centered" class="ptolemy.data.expr.Parameter" value="true">
                </property>
                <property name="fillColor" class="ptolemy.actor.gui.ColorAttribute" value="{1.0,1.0,0.0,1.0}">
                </property>
            </property>
            <property name="_windowProperties" class="ptolemy.actor.gui.WindowPropertiesAttribute" value="{bounds={104, 130, 815, 507}, maximized=false}">
            </property>
            <property name="_vergilSize" class="ptolemy.actor.gui.SizeAttribute" value="[600, 400]">
            </property>
            <property name="_vergilZoomFactor" class="ptolemy.data.expr.ExpertParameter" value="4.0">
            </property>
            <property name="_vergilCenter" class="ptolemy.data.expr.ExpertParameter" value="{0.0, 0.0}">
            </property>
        </property>
        <property name="_flipPortsHorizontal" class="ptolemy.data.expr.Parameter" value="true">
            <property name="_editorFactory" class="ptolemy.vergil.toolbox.VisibleParameterEditorFactory">
            </property>
        </property>
        <port name="input" class="ptolemy.actor.TypedIOPort">
            <property name="input"/>
            <property name="_location" class="ptolemy.kernel.util.Location" value="{35.0, 290.0}">
            </property>
        </port>
        <port name="output" class="ptolemy.actor.TypedIOPort">
            <property name="output"/>
            <property name="_location" class="ptolemy.kernel.util.Location" value="{880.0, 375.0}">
            </property>
        </port>
        <entity name="TimedDelay" class="ptolemy.domains.de.lib.TimedDelay">
            <property name="delay" class="ptolemy.data.expr.Parameter" value="deadtime">
            </property>
            <property name="TimedDelayIcon" class="ptolemy.vergil.icon.EditorIcon">
                <property name="rectangle" class="ptolemy.vergil.kernel.attributes.RectangleAttribute">
                    <property name="_location" class="ptolemy.kernel.util.Location" value="{0, 0}">
                    </property>
                    <property name="width" class="ptolemy.data.expr.Parameter" value="60">
                    </property>
                    <property name="height" class="ptolemy.data.expr.Parameter" value="40">
                    </property>
                    <property name="centered" class="ptolemy.data.expr.Parameter" value="true">
                    </property>
                    <property name="fillColor" class="ptolemy.actor.gui.ColorAttribute" value="{1.0, 1.0, 1.0, 1.0}">
                    </property>
                </property>
                <property name="_windowProperties" class="ptolemy.actor.gui.WindowPropertiesAttribute" value="{bounds={137, 109, 815, 518}, maximized=false}">
                </property>
                <property name="_vergilSize" class="ptolemy.actor.gui.SizeAttribute" value="[600, 400]">
                </property>
                <property name="_vergilZoomFactor" class="ptolemy.data.expr.ExpertParameter" value="4.0">
                </property>
                <property name="_vergilCenter" class="ptolemy.data.expr.ExpertParameter" value="{0.0, 0.0}">
                </property>
                <property name="Annotation" class="ptolemy.vergil.kernel.attributes.TextAttribute">
                    <property name="textSize" class="ptolemy.data.expr.Parameter" value="11">
                    </property>
                    <property name="textColor" class="ptolemy.actor.gui.ColorAttribute" value="{0.0,0.0,0.0,1.0}">
                    </property>
                    <property name="text" class="ptolemy.kernel.util.StringAttribute" value="delay of">
                    </property>
                    <property name="_location" class="ptolemy.kernel.util.Location" value="[-23.0, -16.0]">
                    </property>
                </property>
                <property name="ParameterValue" class="ptolemy.vergil.kernel.attributes.AttributeValueAttribute">
                    <property name="attributeName" class="ptolemy.kernel.util.StringAttribute" value="delay">
                    </property>
                    <property name="displayWidth" class="ptolemy.data.expr.Parameter" value="6">
                    </property>
                    <property name="_location" class="ptolemy.kernel.util.Location" value="[-14.0, -2.0]">
                    </property>
                </property>
            </property>
            <property name="_location" class="ptolemy.kernel.util.Location" value="{280.0, 290.0}">
            </property>
            <port name="input" class="ptolemy.actor.TypedIOPort">
                <property name="input"/>
                <property name="_type" class="ptolemy.actor.TypeAttribute" value="double">
                </property>
            </port>
        </entity>
        <entity name="PeriodicSampler" class="ptolemy.domains.ct.lib.CTPeriodicSampler">
            <property name="samplePeriod" class="ptolemy.data.expr.Parameter" value="TimeResolution">
            </property>
            <property name="_location" class="ptolemy.kernel.util.Location" value="{190.0, 290.0}">
            </property>
        </entity>
        <entity name="AddSubtract" class="ptolemy.actor.lib.AddSubtract">
            <property name="_location" class="ptolemy.kernel.util.Location" value="{630.0, 305.0}">
            </property>
        </entity>
        <entity name="Const" class="ptolemy.actor.lib.Const">
            <property name="value" class="ptolemy.data.expr.Parameter" value="InitialValue">
            </property>
            <doc>Create a constant sequence.</doc>
            <property name="_icon" class="ptolemy.vergil.icon.BoxedValueIcon">
                <property name="attributeName" class="ptolemy.kernel.util.StringAttribute" value="value">
                </property>
                <property name="displayWidth" class="ptolemy.data.expr.Parameter" value="60">
                </property>
            </property>
            <property name="_location" class="ptolemy.kernel.util.Location" value="{490.0, 355.0}">
            </property>
        </entity>
        <entity name="Scale" class="ptolemy.actor.lib.Scale">
            <property name="factor" class="ptolemy.data.expr.Parameter" value="gain">
                <property name="_editorFactory" class="ptolemy.vergil.toolbox.VisibleParameterEditorFactory">
                </property>
            </property>
            <property name="_icon" class="ptolemy.vergil.icon.AttributeValueIcon">
                <property name="attributeName" class="ptolemy.kernel.util.StringAttribute" value="factor">
                </property>
            </property>
            <property name="_location" class="ptolemy.kernel.util.Location" value="{105.0, 290.0}">
            </property>
        </entity>
        <entity name="ZeroOrderHold" class="ptolemy.domains.ct.lib.ZeroOrderHold">
            <property name="defaultValue" class="ptolemy.data.expr.Parameter" value="InitialValue">
            </property>
            <property name="_location" class="ptolemy.kernel.util.Location" value="{380.0, 290.0}">
            </property>
        </entity>
        <entity name="Integrator" class="ptolemy.domains.ct.lib.Integrator">
            <property name="initialState" class="ptolemy.data.expr.Parameter" value="InitialValue">
            </property>
            <property name="IntegratorIcon" class="ptolemy.vergil.icon.EditorIcon">
                <property name="rectangle" class="ptolemy.vergil.kernel.attributes.RectangleAttribute">
                    <property name="_location" class="ptolemy.kernel.util.Location" value="-0.0, 0.0">
                    </property>
                    <property name="width" class="ptolemy.data.expr.Parameter" value="38.0">
                    </property>
                    <property name="height" class="ptolemy.data.expr.Parameter" value="40.0">
                    </property>
                    <property name="centered" class="ptolemy.data.expr.Parameter" value="true">
                    </property>
                    <property name="fillColor" class="ptolemy.actor.gui.ColorAttribute" value="{1.0, 1.0, 1.0, 1.0}">
                    </property>
                </property>
                <property name="_windowProperties" class="ptolemy.actor.gui.WindowPropertiesAttribute" value="{bounds={117, 239, 815, 518}, maximized=false}">
                </property>
                <property name="_vergilSize" class="ptolemy.actor.gui.SizeAttribute" value="[600, 400]">
                </property>
                <property name="_vergilZoomFactor" class="ptolemy.data.expr.ExpertParameter" value="4.0">
                </property>
                <property name="_vergilCenter" class="ptolemy.data.expr.ExpertParameter" value="{0.0, 0.0}">
                </property>
                <property name="image" class="ptolemy.vergil.kernel.attributes.ImageAttribute">
                    <property name="source" class="ptolemy.data.expr.FileParameter" value="$CLASSPATH/ptolemy/domains/ct/lib/integral.gif">
                    </property>
                    <property name="_location" class="ptolemy.kernel.util.Location" value="[-5.0, -16.0]">
                    </property>
                </property>
            </property>
            <property name="_location" class="ptolemy.kernel.util.Location" value="{610.0, 405.0}">
            </property>
        </entity>
        <entity name="Expression" class="ptolemy.actor.lib.Expression">
            <property name="expression" class="ptolemy.kernel.util.StringAttribute" value="Integrating ? integrate : tc">
            </property>
            <property name="_icon" class="ptolemy.vergil.icon.BoxedValueIcon">
                <property name="attributeName" class="ptolemy.kernel.util.StringAttribute" value="expression">
                </property>
                <property name="displayWidth" class="ptolemy.data.expr.Parameter" value="60">
                </property>
            </property>
            <property name="_location" class="ptolemy.kernel.util.Location" value="{750.0, 375.0}">
            </property>
            <port name="tc" class="ptolemy.actor.TypedIOPort">
                <property name="input"/>
            </port>
            <port name="integrate" class="ptolemy.actor.TypedIOPort">
                <property name="input"/>
            </port>
        </entity>
        <entity name="ContinuousTransferFunction" class="ptolemy.domains.ct.lib.ContinuousTransferFunction">
            <property name="numerator" class="ptolemy.data.expr.Parameter" value="{1.0}">
            </property>
            <property name="denominator" class="ptolemy.data.expr.Parameter" value="{TimeConstant,1.0}">
            </property>
            <property name="_location" class="ptolemy.kernel.util.Location" value="{500.0, 290.0}">
            </property>
            <entity name="InputAdder" class="ptolemy.actor.lib.AddSubtract">
                <port name="plus" class="ptolemy.actor.TypedIOPort">
                    <property name="input"/>
                    <property name="multiport"/>
                </port>
                <port name="minus" class="ptolemy.actor.TypedIOPort">
                    <property name="input"/>
                    <property name="multiport"/>
                </port>
                <port name="output" class="ptolemy.actor.TypedIOPort">
                    <property name="output"/>
                </port>
            </entity>
            <entity name="OutputAdder" class="ptolemy.actor.lib.AddSubtract">
                <port name="plus" class="ptolemy.actor.TypedIOPort">
                    <property name="input"/>
                    <property name="multiport"/>
                </port>
                <port name="minus" class="ptolemy.actor.TypedIOPort">
                    <property name="input"/>
                    <property name="multiport"/>
                </port>
                <port name="output" class="ptolemy.actor.TypedIOPort">
                    <property name="output"/>
                </port>
            </entity>
            <entity name="Integrator0" class="ptolemy.domains.ct.lib.Integrator">
                <property name="initialState" class="ptolemy.data.expr.Parameter" value="0.0">
                </property>
                <port name="input" class="ptolemy.actor.TypedIOPort">
                    <property name="input"/>
                    <property name="signalType" class="ptolemy.data.expr.Parameter" value="&quot;CONTINUOUS&quot;">
                    </property>
                </port>
                <port name="output" class="ptolemy.actor.TypedIOPort">
                    <property name="output"/>
                    <property name="signalType" class="ptolemy.data.expr.Parameter" value="&quot;CONTINUOUS&quot;">
                    </property>
                </port>
            </entity>
            <entity name="Feedback0" class="ptolemy.actor.lib.Scale">
                <property name="factor" class="ptolemy.data.expr.Parameter" value="-1.0">
                </property>
                <property name="scaleOnLeft" class="ptolemy.data.expr.Parameter" value="true">
                </property>
                <port name="input" class="ptolemy.actor.TypedIOPort">
                    <property name="input"/>
                </port>
                <port name="output" class="ptolemy.actor.TypedIOPort">
                    <property name="output"/>
                </port>
            </entity>
            <entity name="Feedforward0" class="ptolemy.actor.lib.Scale">
                <property name="factor" class="ptolemy.data.expr.Parameter" value="1.0">
                </property>
                <property name="scaleOnLeft" class="ptolemy.data.expr.Parameter" value="true">
                </property>
                <port name="input" class="ptolemy.actor.TypedIOPort">
                    <property name="input"/>
                </port>
                <port name="output" class="ptolemy.actor.TypedIOPort">
                    <property name="output"/>
                </port>
            </entity>
            <relation name="node0" class="ptolemy.actor.TypedIORelation">
                <property name="width" class="ptolemy.data.expr.Parameter" value="1">
                </property>
            </relation>
            <relation name="_R" class="ptolemy.actor.TypedIORelation">
                <property name="width" class="ptolemy.data.expr.Parameter" value="1">
                </property>
            </relation>
            <relation name="_R2" class="ptolemy.actor.TypedIORelation">
                <property name="width" class="ptolemy.data.expr.Parameter" value="1">
                </property>
            </relation>
            <relation name="_R3" class="ptolemy.actor.TypedIORelation">
                <property name="width" class="ptolemy.data.expr.Parameter" value="1">
                </property>
            </relation>
            <relation name="inputRelation" class="ptolemy.actor.TypedIORelation">
                <property name="width" class="ptolemy.data.expr.Parameter" value="1">
                </property>
            </relation>
            <relation name="outputRelation" class="ptolemy.actor.TypedIORelation">
                <property name="width" class="ptolemy.data.expr.Parameter" value="1">
                </property>
            </relation>
            <link port="input" relation="inputRelation"/>
            <link port="output" relation="outputRelation"/>
            <link port="InputAdder.plus" relation="_R"/>
            <link port="InputAdder.plus" relation="inputRelation"/>
            <link port="InputAdder.output" relation="_R3"/>
            <link port="OutputAdder.plus" relation="_R2"/>
            <link port="OutputAdder.output" relation="outputRelation"/>
            <link port="Integrator0.input" relation="_R3"/>
            <link port="Integrator0.output" relation="node0"/>
            <link port="Feedback0.input" relation="node0"/>
            <link port="Feedback0.output" relation="_R"/>
            <link port="Feedforward0.input" relation="node0"/>
            <link port="Feedforward0.output" relation="_R2"/>
        </entity>
        <relation name="relation" class="ptolemy.actor.TypedIORelation">
            <property name="width" class="ptolemy.data.expr.Parameter" value="1">
            </property>
        </relation>
        <relation name="relation2" class="ptolemy.actor.TypedIORelation">
            <property name="width" class="ptolemy.data.expr.Parameter" value="1">
            </property>
        </relation>
        <relation name="relation3" class="ptolemy.actor.TypedIORelation">
            <property name="width" class="ptolemy.data.expr.Parameter" value="1">
            </property>
            <vertex name="vertex1" value="{560.0, 290.0}">
            </vertex>
        </relation>
        <relation name="relation4" class="ptolemy.actor.TypedIORelation">
            <property name="width" class="ptolemy.data.expr.Parameter" value="1">
            </property>
        </relation>
        <relation name="relation5" class="ptolemy.actor.TypedIORelation">
            <property name="width" class="ptolemy.data.expr.Parameter" value="1">
            </property>
        </relation>
        <relation name="relation6" class="ptolemy.actor.TypedIORelation">
            <property name="width" class="ptolemy.data.expr.Parameter" value="1">
            </property>
        </relation>
        <relation name="relation7" class="ptolemy.actor.TypedIORelation">
            <property name="width" class="ptolemy.data.expr.Parameter" value="1">
            </property>
        </relation>
        <relation name="relation8" class="ptolemy.actor.TypedIORelation">
            <property name="width" class="ptolemy.data.expr.Parameter" value="1">
            </property>
        </relation>
        <relation name="relation9" class="ptolemy.actor.TypedIORelation">
            <property name="width" class="ptolemy.data.expr.Parameter" value="1">
            </property>
        </relation>
        <relation name="relation10" class="ptolemy.actor.TypedIORelation">
            <property name="width" class="ptolemy.data.expr.Parameter" value="1">
            </property>
        </relation>
        <link port="input" relation="relation9"/>
        <link port="output" relation="relation8"/>
        <link port="TimedDelay.input" relation="relation"/>
        <link port="TimedDelay.output" relation="relation5"/>
        <link port="PeriodicSampler.input" relation="relation2"/>
        <link port="PeriodicSampler.output" relation="relation"/>
        <link port="AddSubtract.plus" relation="relation3"/>
        <link port="AddSubtract.plus" relation="relation4"/>
        <link port="AddSubtract.output" relation="relation6"/>
        <link port="Const.output" relation="relation4"/>
        <link port="Scale.input" relation="relation9"/>
        <link port="Scale.output" relation="relation2"/>
        <link port="ZeroOrderHold.input" relation="relation5"/>
        <link port="ZeroOrderHold.output" relation="relation10"/>
        <link port="Integrator.input" relation="relation3"/>
        <link port="Integrator.output" relation="relation7"/>
        <link port="Expression.output" relation="relation8"/>
        <link port="Expression.tc" relation="relation6"/>
        <link port="Expression.integrate" relation="relation7"/>
        <link port="ContinuousTransferFunction.input" relation="relation10"/>
        <link port="ContinuousTransferFunction.output" relation="relation3"/>
    </entity>
    <relation name="relation4" class="ptolemy.actor.TypedIORelation">
        <property name="width" class="ptolemy.data.expr.Parameter" value="1">
        </property>
        <vertex name="vertex1" value="[385.0, 205.0]">
        </vertex>
    </relation>
    <relation name="relation" class="ptolemy.actor.TypedIORelation">
        <property name="width" class="ptolemy.data.expr.Parameter" value="1">
        </property>
        <vertex name="vertex1" value="[245.0, 205.0]">
        </vertex>
    </relation>
    <relation name="relation5" class="ptolemy.actor.TypedIORelation">
        <property name="width" class="ptolemy.data.expr.Parameter" value="1">
        </property>
        <vertex name="vertex1" value="[475.0, 205.0]">
        </vertex>
    </relation>
    <relation name="relation3" class="ptolemy.actor.TypedIORelation">
        <property name="width" class="ptolemy.data.expr.Parameter" value="1">
        </property>
    </relation>
    <relation name="relation2" class="ptolemy.actor.TypedIORelation">
        <property name="width" class="ptolemy.data.expr.Parameter" value="1">
        </property>
    </relation>
    <relation name="relation7" class="ptolemy.actor.TypedIORelation">
        <property name="width" class="ptolemy.data.expr.Parameter" value="1">
        </property>
    </relation>
    <relation name="relation8" class="ptolemy.actor.TypedIORelation">
        <property name="width" class="ptolemy.data.expr.Parameter" value="1">
        </property>
        <vertex name="vertex1" value="[250.0, 140.0]">
        </vertex>
    </relation>
    <link port="Const.output" relation="relation3"/>
    <link port="TimedPlotter.input" relation="relation4"/>
    <link port="TimedPlotter.input" relation="relation"/>
    <link port="PID_controller.SP" relation="relation2"/>
    <link port="PID_controller.PV" relation="relation8"/>
    <link port="PID_controller.CO" relation="relation7"/>
    <link port="PeriodicSampler.input" relation="relation3"/>
    <link port="PeriodicSampler.input" relation="relation"/>
    <link port="PeriodicSampler.output" relation="relation2"/>
    <link port="PeriodicSampler.output" relation="relation8"/>
    <link port="ZeroOrderHold.input" relation="relation7"/>
    <link port="ZeroOrderHold.output" relation="relation5"/>
    <link port="FOPDT.input" relation="relation4"/>
    <link port="FOPDT.output" relation="relation"/>
    <link relation1="relation4" relation2="relation5"/>
</entity>
