| 1 | package Modelica "Modelica Standard Library"
|
|---|
| 2 | extends Icons.Library;
|
|---|
| 3 | annotation(preferedView="info", version="2.2.1", versionDate="2006-03-24", conversion(from(version="1.6", ModelicaAdditions(version="1.5"), MultiBody(version="1.0.1"), MultiBody(version="1.0"), Matrices(version="0.8"), script="Scripts/ConvertModelica_from_1.6_to_2.1.mos"), from(version="2.1 Beta1", script="Scripts/ConvertModelica_from_2.1Beta1_to_2.1.mos"), noneFromVersion="2.1", noneFromVersion="2.2"), Dymola(checkSum="539989979:1143034484"), Settings(NewStateSelection=true), Documentation(info="<HTML>
|
|---|
| 4 | <p>
|
|---|
| 5 | Package <b>Modelica</b> is a <b>standardized</b> and <b>free</b> package
|
|---|
| 6 | that is developed together with the Modelica language from the
|
|---|
| 7 | Modelica Association, see <a href=\"http://www.Modelica.org\">http://www.Modelica.org</a>.
|
|---|
| 8 | It is also called <b>Modelica Standard Library</b>.
|
|---|
| 9 | It provides model components in many domains that are based on
|
|---|
| 10 | standardized interface definitions. Some typical examples are shown
|
|---|
| 11 | in the next figure:
|
|---|
| 12 | </p>
|
|---|
| 13 |
|
|---|
| 14 | <p>
|
|---|
| 15 | <img src=\"./Images/UsersGuide/ModelicaLibraries.png\">
|
|---|
| 16 | </p>
|
|---|
| 17 |
|
|---|
| 18 | <p>
|
|---|
| 19 | For an introduction, have especially a look at:
|
|---|
| 20 | </p>
|
|---|
| 21 | <ul>
|
|---|
| 22 | <li> <a href=\"Modelica://Modelica.UsersGuide\">Users Guide</a>
|
|---|
| 23 | discusses some aspects of the Modelica Standard Library, such as
|
|---|
| 24 | interface definitions and used conventions.</li>
|
|---|
| 25 | <li><a href=\"Modelica://Modelica.UsersGuide.ReleaseNotes\">Release Notes</a>
|
|---|
| 26 | summarizes the changes of new versions of this package.</li>
|
|---|
| 27 | <li> Packages <b>Examples</b> in the various subpackages, demonstrate
|
|---|
| 28 | how to use the components of the corresponding sublibrary.</li>
|
|---|
| 29 | </ul>
|
|---|
| 30 |
|
|---|
| 31 | <p>
|
|---|
| 32 | Copyright © 1998-2006, Modelica Association.
|
|---|
| 33 | </p>
|
|---|
| 34 | <p>
|
|---|
| 35 | <i>This Modelica package is <b>free</b> software; it can be redistributed and/or modified
|
|---|
| 36 | under the terms of the <b>Modelica license</b>, see the license conditions
|
|---|
| 37 | and the accompanying <b>disclaimer</b>
|
|---|
| 38 | <a href=\"Modelica://Modelica.UsersGuide.ModelicaLicense\">here</a>.</i>
|
|---|
| 39 | </p>
|
|---|
| 40 | <p> <b>Note:</b> This is a <i>subset</i> of the official Modelica package with minor changes made by MathCore Engineering AB.
|
|---|
| 41 | For a complete list of changes see the <a href=\"Modelica://Modelica.UsersGuide.ReleaseNotes\">Release Notes</a>.
|
|---|
| 42 | </p>
|
|---|
| 43 | </HTML>
|
|---|
| 44 | ", revisions=""), Icon(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10})), Diagram(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10})));
|
|---|
| 45 | package Math "Mathematical functions (e.g., sin, cos) and operations on matrices (e.g., norm, solve, eig, exp)"
|
|---|
| 46 | import SI = Modelica.SIunits;
|
|---|
| 47 | extends Modelica.Icons.Library2;
|
|---|
| 48 | annotation(preferedView="info", Invisible=true, Icon(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10}), graphics={Text(visible=true, extent={{-59,-56},{42,-9}}, textString="f(x)", fontName="Arial")}), Documentation(info="<HTML>
|
|---|
| 49 | <p>
|
|---|
| 50 | This package contains <b>basic mathematical functions</b> (such as sin(..)),
|
|---|
| 51 | as well as functions operating on <b>matrices</b>.
|
|---|
| 52 | </p>
|
|---|
| 53 |
|
|---|
| 54 | <dl>
|
|---|
| 55 | <dt><b>Main Author:</b>
|
|---|
| 56 | <dd><a href=\"http://www.robotic.dlr.de/Martin.Otter/\">Martin Otter</a><br>
|
|---|
| 57 | Deutsches Zentrum für Luft und Raumfahrt e.V. (DLR)<br>
|
|---|
| 58 | Institut für Robotik und Mechatronik<br>
|
|---|
| 59 | Postfach 1116<br>
|
|---|
| 60 | D-82230 Wessling<br>
|
|---|
| 61 | Germany<br>
|
|---|
| 62 | email: <A HREF=\"mailto:Martin.Otter@dlr.de\">Martin.Otter@dlr.de</A><br>
|
|---|
| 63 | </dl>
|
|---|
| 64 |
|
|---|
| 65 | <p>
|
|---|
| 66 | Copyright © 1998-2006, Modelica Association and DLR.
|
|---|
| 67 | </p>
|
|---|
| 68 | <p>
|
|---|
| 69 | <i>This Modelica package is <b>free</b> software; it can be redistributed and/or modified
|
|---|
| 70 | under the terms of the <b>Modelica license</b>, see the license conditions
|
|---|
| 71 | and the accompanying <b>disclaimer</b>
|
|---|
| 72 | <a href=\"Modelica://Modelica.UsersGuide.ModelicaLicense\">here</a>.</i>
|
|---|
| 73 | </p><br>
|
|---|
| 74 | </HTML>
|
|---|
| 75 | ", revisions="<html>
|
|---|
| 76 | <ul>
|
|---|
| 77 | <li><i>October 21, 2002</i>
|
|---|
| 78 | by <a href=\"http://www.robotic.dlr.de/Martin.Otter/\">Martin Otter</a>
|
|---|
| 79 | and <a href=\"http://www.robotic.dlr.de/Christian.Schweiger/\">Christian Schweiger</a>:<br>
|
|---|
| 80 | Function tempInterpol2 added.</li>
|
|---|
| 81 | <li><i>Oct. 24, 1999</i>
|
|---|
| 82 | by <a href=\"http://www.robotic.dlr.de/Martin.Otter/\">Martin Otter</a>:<br>
|
|---|
| 83 | Icons for icon and diagram level introduced.</li>
|
|---|
| 84 | <li><i>June 30, 1999</i>
|
|---|
| 85 | by <a href=\"http://www.robotic.dlr.de/Martin.Otter/\">Martin Otter</a>:<br>
|
|---|
| 86 | Realized.</li>
|
|---|
| 87 | </ul>
|
|---|
| 88 |
|
|---|
| 89 | </html>"), Diagram(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10})));
|
|---|
| 90 | function sin "sine"
|
|---|
| 91 | extends baseIcon1;
|
|---|
| 92 | input SI.Angle u;
|
|---|
| 93 | output Real y;
|
|---|
| 94 | annotation(Icon(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10}), graphics={Line(visible=true, points={{-90,0},{68,0}}, color={192,192,192}),Polygon(visible=true, lineColor={192,192,192}, fillColor={192,192,192}, fillPattern=FillPattern.Solid, points={{90,0},{68,8},{68,-8},{90,0}}),Line(visible=true, points={{-80,0},{-68.7,34.2},{-61.5,53.1},{-55.1,66.4},{-49.4,74.6},{-43.8,79.1},{-38.2,79.8},{-32.6,76.6},{-26.9,69.7},{-21.3,59.4},{-14.9,44.1},{-6.83,21.2},{10.1,-30.8},{17.3,-50.2},{23.7,-64.2},{29.3,-73.1},{35,-78.4},{40.6,-80},{46.2,-77.6},{51.9,-71.5},{57.5,-61.9},{63.9,-47.2},{72,-24.8},{80,0}}, smooth=Smooth.Bezier),Text(visible=true, fillColor={192,192,192}, extent={{12,36},{84,84}}, textString="sin", fontName="Arial")}), Diagram(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10}), graphics={Line(visible=true, points={{-100,0},{84,0}}, color={192,192,192}),Polygon(visible=true, lineColor={192,192,192}, fillColor={192,192,192}, fillPattern=FillPattern.Solid, points={{100,0},{84,6},{84,-6},{100,0}}),Line(visible=true, points={{-80,0},{-68.7,34.2},{-61.5,53.1},{-55.1,66.4},{-49.4,74.6},{-43.8,79.1},{-38.2,79.8},{-32.6,76.6},{-26.9,69.7},{-21.3,59.4},{-14.9,44.1},{-6.83,21.2},{10.1,-30.8},{17.3,-50.2},{23.7,-64.2},{29.3,-73.1},{35,-78.4},{40.6,-80},{46.2,-77.6},{51.9,-71.5},{57.5,-61.9},{63.9,-47.2},{72,-24.8},{80,0}}, smooth=Smooth.Bezier),Text(visible=true, extent={{-105,72},{-85,88}}, textString="1", fontName="Arial"),Text(visible=true, extent={{70,5},{90,25}}, textString="2*pi", fontName="Arial"),Text(visible=true, extent={{-105,-88},{-85,-72}}, textString="-1", fontName="Arial"),Text(visible=true, fillColor={160,160,160}, extent={{92,-22},{112,-2}}, textString="u", fontName="Arial")}), Documentation(info="<html>
|
|---|
| 95 |
|
|---|
| 96 | </html>"));
|
|---|
| 97 |
|
|---|
| 98 | external "C" y=sin(u) ;
|
|---|
| 99 |
|
|---|
| 100 | end sin;
|
|---|
| 101 |
|
|---|
| 102 | function asin "inverse sine (-1 <= u <= 1)"
|
|---|
| 103 | extends baseIcon2;
|
|---|
| 104 | input Real u;
|
|---|
| 105 | output SI.Angle y;
|
|---|
| 106 | annotation(Icon(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10}), graphics={Line(visible=true, points={{-90,0},{68,0}}, color={192,192,192}),Polygon(visible=true, lineColor={192,192,192}, fillColor={192,192,192}, fillPattern=FillPattern.Solid, points={{90,0},{68,8},{68,-8},{90,0}}),Line(visible=true, points={{-80,-80},{-79.2,-72.8},{-77.6,-67.5},{-73.6,-59.4},{-66.3,-49.8},{-53.5,-37.3},{-30.2,-19.7},{37.4,24.8},{57.5,40.8},{68.7,52.7},{75.2,62.2},{77.6,67.5},{80,80}}, smooth=Smooth.Bezier),Text(visible=true, fillColor={192,192,192}, extent={{-88,30},{-16,78}}, textString="asin", fontName="Arial")}), Diagram(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10}), graphics={Text(visible=true, extent={{-40,-88},{-15,-72}}, textString="-pi/2", fontName="Arial"),Text(visible=true, extent={{-38,72},{-13,88}}, textString=" pi/2", fontName="Arial"),Text(visible=true, extent={{70,5},{90,25}}, textString="+1", fontName="Arial"),Text(visible=true, extent={{-90,1},{-70,21}}, textString="-1", fontName="Arial"),Line(visible=true, points={{-100,0},{84,0}}, color={192,192,192}),Polygon(visible=true, lineColor={192,192,192}, fillColor={192,192,192}, fillPattern=FillPattern.Solid, points={{100,0},{84,6},{84,-6},{100,0}}),Line(visible=true, points={{-80,-80},{-79.2,-72.8},{-77.6,-67.5},{-73.6,-59.4},{-66.3,-49.8},{-53.5,-37.3},{-30.2,-19.7},{37.4,24.8},{57.5,40.8},{68.7,52.7},{75.2,62.2},{77.6,67.5},{80,80}}, smooth=Smooth.Bezier),Text(visible=true, fillColor={160,160,160}, extent={{92,-22},{112,-2}}, textString="u", fontName="Arial")}), Documentation(info="<html>
|
|---|
| 107 |
|
|---|
| 108 | </html>"));
|
|---|
| 109 |
|
|---|
| 110 | external "C" y=asin(u) ;
|
|---|
| 111 |
|
|---|
| 112 | end asin;
|
|---|
| 113 |
|
|---|
| 114 | function exp "exponential, base e"
|
|---|
| 115 | extends baseIcon2;
|
|---|
| 116 | input Real u;
|
|---|
| 117 | output Real y;
|
|---|
| 118 | annotation(Icon(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10}), graphics={Line(visible=true, points={{-90,-80.3976},{68,-80.3976}}, color={192,192,192}),Polygon(visible=true, lineColor={192,192,192}, fillColor={192,192,192}, fillPattern=FillPattern.Solid, points={{90,-80.3976},{68,-72.3976},{68,-88.3976},{90,-80.3976}}),Line(visible=true, points={{-80,-80},{-31,-77.9},{-6.03,-74},{10.9,-68.4},{23.7,-61},{34.2,-51.6},{43,-40.3},{50.3,-27.8},{56.7,-13.5},{62.3,2.23},{67.1,18.6},{72,38.2},{76,57.6},{80,80}}, smooth=Smooth.Bezier),Text(visible=true, fillColor={192,192,192}, extent={{-86,2},{-14,50}}, textString="exp", fontName="Arial")}), Diagram(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10}), graphics={Line(visible=true, points={{-100,-80.3976},{84,-80.3976}}, color={192,192,192}),Polygon(visible=true, lineColor={192,192,192}, fillColor={192,192,192}, fillPattern=FillPattern.Solid, points={{100,-80.3976},{84,-74.3976},{84,-86.3976},{100,-80.3976}}),Line(visible=true, points={{-80,-80},{-31,-77.9},{-6.03,-74},{10.9,-68.4},{23.7,-61},{34.2,-51.6},{43,-40.3},{50.3,-27.8},{56.7,-13.5},{62.3,2.23},{67.1,18.6},{72,38.2},{76,57.6},{80,80}}, smooth=Smooth.Bezier),Text(visible=true, extent={{-31,72},{-11,88}}, textString="20", fontName="Arial"),Text(visible=true, extent={{-92,-103},{-72,-83}}, textString="-3", fontName="Arial"),Text(visible=true, extent={{70,-103},{90,-83}}, textString="3", fontName="Arial"),Text(visible=true, extent={{-18,-73},{2,-53}}, textString="1", fontName="Arial"),Text(visible=true, fillColor={160,160,160}, extent={{96,-102},{116,-82}}, textString="u", fontName="Arial")}));
|
|---|
| 119 |
|
|---|
| 120 | external "C" y=exp(u) ;
|
|---|
| 121 |
|
|---|
| 122 | end exp;
|
|---|
| 123 |
|
|---|
| 124 | partial function baseIcon1 "Basic icon for mathematical function with y-axis on left side"
|
|---|
| 125 | annotation(Diagram(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10}), graphics={Line(visible=true, points={{-80,80},{-88,80}}, color={192,192,192}),Line(visible=true, points={{-80,-80},{-88,-80}}, color={192,192,192}),Line(visible=true, points={{-80,-90},{-80,84}}, color={192,192,192}),Text(visible=true, fillColor={160,160,160}, extent={{-75,90},{-55,110}}, textString="y", fontName="Arial"),Polygon(visible=true, lineColor={192,192,192}, fillColor={192,192,192}, fillPattern=FillPattern.Solid, points={{-80,100},{-86,84},{-74,84},{-80,100}})}), Icon(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10}), graphics={Rectangle(visible=true, fillColor={255,255,255}, fillPattern=FillPattern.Solid, extent={{-100,-100},{100,100}}),Line(visible=true, points={{-80,-80},{-80,68}}, color={192,192,192}),Polygon(visible=true, lineColor={192,192,192}, fillColor={192,192,192}, fillPattern=FillPattern.Solid, points={{-80,90},{-88,68},{-72,68},{-80,90}}),Text(visible=true, fillColor={0,0,255}, fillPattern=FillPattern.Solid, extent={{-150,110},{150,150}}, textString="%name", fontName="Arial")}));
|
|---|
| 126 | end baseIcon1;
|
|---|
| 127 |
|
|---|
| 128 | partial function baseIcon2 "Basic icon for mathematical function with y-axis in middle"
|
|---|
| 129 | annotation(Diagram(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10}), graphics={Line(visible=true, points={{0,80},{-8,80}}, color={192,192,192}),Line(visible=true, points={{0,-80},{-8,-80}}, color={192,192,192}),Line(visible=true, points={{0,-90},{0,84}}, color={192,192,192}),Text(visible=true, fillColor={160,160,160}, extent={{5,90},{25,110}}, textString="y", fontName="Arial"),Polygon(visible=true, lineColor={192,192,192}, fillColor={192,192,192}, fillPattern=FillPattern.Solid, points={{0,100},{-6,84},{6,84},{0,100}})}), Icon(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10}), graphics={Rectangle(visible=true, fillColor={255,255,255}, fillPattern=FillPattern.Solid, extent={{-100,-100},{100,100}}),Line(visible=true, points={{0,-80},{0,68}}, color={192,192,192}),Polygon(visible=true, lineColor={192,192,192}, fillColor={192,192,192}, fillPattern=FillPattern.Solid, points={{0,90},{-8,68},{8,68},{0,90}}),Text(visible=true, fillColor={0,0,255}, fillPattern=FillPattern.Solid, extent={{-150,110},{150,150}}, textString="%name", fontName="Arial")}));
|
|---|
| 130 | end baseIcon2;
|
|---|
| 131 |
|
|---|
| 132 | end Math;
|
|---|
| 133 |
|
|---|
| 134 | package Blocks "Library for basic input/output control blocks (continuous, discrete, logical, table blocks)"
|
|---|
| 135 | import SI = Modelica.SIunits;
|
|---|
| 136 | extends Modelica.Icons.Library2;
|
|---|
| 137 | annotation(preferedView="info", Icon(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10}), graphics={Rectangle(visible=true, extent={{-32,-35},{16,-6}}),Rectangle(visible=true, extent={{-32,-85},{16,-56}}),Line(visible=true, points={{16,-20},{49,-20},{49,-71},{16,-71}}),Line(visible=true, points={{-32,-72},{-64,-72},{-64,-21},{-32,-21}}),Polygon(visible=true, fillPattern=FillPattern.Solid, points={{16,-71},{29,-67},{29,-74},{16,-71}}),Polygon(visible=true, fillPattern=FillPattern.Solid, points={{-32,-21},{-46,-17},{-46,-25},{-32,-21}})}), Documentation(info="<html>
|
|---|
| 138 | <p>
|
|---|
| 139 | This library contains input/output blocks to build up block diagrams.
|
|---|
| 140 | </p>
|
|---|
| 141 |
|
|---|
| 142 | <dl>
|
|---|
| 143 | <dt><b>Main Author:</b>
|
|---|
| 144 | <dd><a href=\"http://www.robotic.dlr.de/Martin.Otter/\">Martin Otter</a><br>
|
|---|
| 145 | Deutsches Zentrum für Luft und Raumfahrt e. V. (DLR)<br>
|
|---|
| 146 | Oberpfaffenhofen<br>
|
|---|
| 147 | Postfach 1116<br>
|
|---|
| 148 | D-82230 Wessling<br>
|
|---|
| 149 | email: <A HREF=\"mailto:Martin.Otter@dlr.de\">Martin.Otter@dlr.de</A><br>
|
|---|
| 150 | </dl>
|
|---|
| 151 | <br>
|
|---|
| 152 | <br>
|
|---|
| 153 |
|
|---|
| 154 | <p>
|
|---|
| 155 | Copyright © 1998-2006, Modelica Association and DLR.
|
|---|
| 156 | </p>
|
|---|
| 157 | <p>
|
|---|
| 158 | <i>This Modelica package is <b>free</b> software; it can be redistributed and/or modified
|
|---|
| 159 | under the terms of the <b>Modelica license</b>, see the license conditions
|
|---|
| 160 | and the accompanying <b>disclaimer</b>
|
|---|
| 161 | <a href=\"Modelica://Modelica.UsersGuide.ModelicaLicense\">here</a>.</i>
|
|---|
| 162 | </p><br>
|
|---|
| 163 | </HTML>
|
|---|
| 164 | ", revisions="<html>
|
|---|
| 165 | <ul>
|
|---|
| 166 | <li><i>June 23, 2004</i>
|
|---|
| 167 | by <a href=\"http://www.robotic.dlr.de/Martin.Otter/\">Martin Otter</a>:<br>
|
|---|
| 168 | Introduced new block connectors and adapated all blocks to the new connectors.
|
|---|
| 169 | Included subpackages Continuous, Discrete, Logical, Nonlinear from
|
|---|
| 170 | package ModelicaAdditions.Blocks.
|
|---|
| 171 | Included subpackage ModelicaAdditions.Table in Modelica.Blocks.Sources
|
|---|
| 172 | and in the new package Modelica.Blocks.Tables.
|
|---|
| 173 | Added new blocks to Blocks.Sources and Blocks.Logical.
|
|---|
| 174 | </li>
|
|---|
| 175 | <li><i>October 21, 2002</i>
|
|---|
| 176 | by <a href=\"http://www.robotic.dlr.de/Martin.Otter/\">Martin Otter</a>
|
|---|
| 177 | and <a href=\"http://www.robotic.dlr.de/Christian.Schweiger/\">Christian Schweiger</a>:<br>
|
|---|
| 178 | New subpackage Examples, additional components.
|
|---|
| 179 | </li>
|
|---|
| 180 | <li><i>June 20, 2000</i>
|
|---|
| 181 | by <a href=\"http://www.robotic.dlr.de/Martin.Otter/\">Martin Otter</a> and
|
|---|
| 182 | Michael Tiller:<br>
|
|---|
| 183 | Introduced a replaceable signal type into
|
|---|
| 184 | Blocks.Interfaces.RealInput/RealOutput:
|
|---|
| 185 | <pre>
|
|---|
| 186 | replaceable type SignalType = Real
|
|---|
| 187 | </pre>
|
|---|
| 188 | in order that the type of the signal of an input/output block
|
|---|
| 189 | can be changed to a physical type, for example:
|
|---|
| 190 | <pre>
|
|---|
| 191 | Sine sin1(outPort(redeclare type SignalType=Modelica.SIunits.Torque))
|
|---|
| 192 | </pre>
|
|---|
| 193 | </li>
|
|---|
| 194 | <li><i>Sept. 18, 1999</i>
|
|---|
| 195 | by <a href=\"http://www.robotic.dlr.de/Martin.Otter/\">Martin Otter</a>:<br>
|
|---|
| 196 | Renamed to Blocks. New subpackages Math, Nonlinear.
|
|---|
| 197 | Additional components in subpackages Interfaces, Continuous
|
|---|
| 198 | and Sources. </li>
|
|---|
| 199 | <li><i>June 30, 1999</i>
|
|---|
| 200 | by <a href=\"http://www.robotic.dlr.de/Martin.Otter/\">Martin Otter</a>:<br>
|
|---|
| 201 | Realized a first version, based on an existing Dymola library
|
|---|
| 202 | of Dieter Moormann and Hilding Elmqvist.</li>
|
|---|
| 203 | </ul>
|
|---|
| 204 | </html>"), Diagram(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10})));
|
|---|
| 205 | package Sources "Signal source blocks generating Real and Boolean signals"
|
|---|
| 206 | import Modelica.Blocks.Interfaces;
|
|---|
| 207 | import Modelica.SIunits;
|
|---|
| 208 | extends Modelica.Icons.Library;
|
|---|
| 209 | annotation(preferedView="info", Documentation(info="<HTML>
|
|---|
| 210 | <p>
|
|---|
| 211 | This package contains <b>source</b> components, i.e., blocks which
|
|---|
| 212 | have only output signals. These blocks are used as signal generators
|
|---|
| 213 | for Real, Integer and Boolean signals.
|
|---|
| 214 | </p>
|
|---|
| 215 |
|
|---|
| 216 | <p>
|
|---|
| 217 | All Real source signals (with the exception of the Constant source)
|
|---|
| 218 | have at least the following two parameters:
|
|---|
| 219 | </p>
|
|---|
| 220 |
|
|---|
| 221 | <table border=1 cellspacing=0 cellpadding=2>
|
|---|
| 222 | <tr><td><b>offset</b></td>
|
|---|
| 223 | <td>Value which is added to the signal</td>
|
|---|
| 224 | </tr>
|
|---|
| 225 | <tr><td><b>startTime</b></td>
|
|---|
| 226 | <td>Start time of signal. For time < startTime,
|
|---|
| 227 | the output y is set to offset.</td>
|
|---|
| 228 | </tr>
|
|---|
| 229 | </table>
|
|---|
| 230 |
|
|---|
| 231 | <p>
|
|---|
| 232 | The <b>offset</b> parameter is especially useful in order to shift
|
|---|
| 233 | the corresponding source, such that at initial time the system
|
|---|
| 234 | is stationary. To determine the corresponding value of offset,
|
|---|
| 235 | usually requires a trimming calculation.
|
|---|
| 236 | </p>
|
|---|
| 237 | </HTML>
|
|---|
| 238 | ", revisions="<html>
|
|---|
| 239 | <ul>
|
|---|
| 240 | <li><i>October 21, 2002</i>
|
|---|
| 241 | by <a href=\"http://www.robotic.dlr.de/Martin.Otter/\">Martin Otter</a>
|
|---|
| 242 | and <a href=\"http://www.robotic.dlr.de/Christian.Schweiger/\">Christian Schweiger</a>:<br>
|
|---|
| 243 | Integer sources added. Step, TimeTable and BooleanStep slightly changed.</li>
|
|---|
| 244 | <li><i>Nov. 8, 1999</i>
|
|---|
| 245 | by <a href=\"mailto:clauss@eas.iis.fhg.de\">Christoph Clauß</a>,
|
|---|
| 246 | <A HREF=\"mailto:schneider@eas.iis.fhg.de\">schneider@eas.iis.fhg.de</A>,
|
|---|
| 247 | <a href=\"http://www.robotic.dlr.de/Martin.Otter/\">Martin Otter</a>:<br>
|
|---|
| 248 | New sources: Exponentials, TimeTable. Trapezoid slightly enhanced
|
|---|
| 249 | (nperiod=-1 is an infinite number of periods).</li>
|
|---|
| 250 | <li><i>Oct. 31, 1999</i>
|
|---|
| 251 | by <a href=\"http://www.robotic.dlr.de/Martin.Otter/\">Martin Otter</a>:<br>
|
|---|
| 252 | <a href=\"mailto:clauss@eas.iis.fhg.de\">Christoph Clauß</a>,
|
|---|
| 253 | <A HREF=\"mailto:schneider@eas.iis.fhg.de\">schneider@eas.iis.fhg.de</A>,
|
|---|
| 254 | All sources vectorized. New sources: ExpSine, Trapezoid,
|
|---|
| 255 | BooleanConstant, BooleanStep, BooleanPulse, SampleTrigger.
|
|---|
| 256 | Improved documentation, especially detailed description of
|
|---|
| 257 | signals in diagram layer.</li>
|
|---|
| 258 | <li><i>June 29, 1999</i>
|
|---|
| 259 | by <a href=\"http://www.robotic.dlr.de/Martin.Otter/\">Martin Otter</a>:<br>
|
|---|
| 260 | Realized a first version, based on an existing Dymola library
|
|---|
| 261 | of Dieter Moormann and Hilding Elmqvist.</li>
|
|---|
| 262 | </ul>
|
|---|
| 263 | </html>"), Icon(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10})), Diagram(coordinateSystem(extent={{0,0},{430,-442}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10})));
|
|---|
| 264 | block Sine "Generate sine signal"
|
|---|
| 265 | parameter Real amplitude=1 "Amplitude of sine wave";
|
|---|
| 266 | parameter SIunits.Frequency freqHz=1 "Frequency of sine wave";
|
|---|
| 267 | parameter SIunits.Angle phase=0 "Phase of sine wave";
|
|---|
| 268 | parameter Real offset=0 "Offset of output signal";
|
|---|
| 269 | parameter SIunits.Time startTime=0 "Output = offset for time < startTime";
|
|---|
| 270 | extends Interfaces.SO;
|
|---|
| 271 | annotation(Diagram(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10}), graphics={Line(visible=true, points={{-80,-90},{-80,84}}, color={192,192,192}),Polygon(visible=true, lineColor={192,192,192}, fillColor={192,192,192}, fillPattern=FillPattern.Solid, points={{-80,100},{-86,84},{-74,84},{-80,100}}),Line(visible=true, points={{-99,-40},{85,-40}}, color={192,192,192}),Polygon(visible=true, lineColor={192,192,192}, fillColor={192,192,192}, fillPattern=FillPattern.Solid, points={{101,-40},{85,-34},{85,-46},{101,-40}}),Line(visible=true, points={{-40,0},{-31.6,34.2},{-26.1,53.1},{-21.3,66.4},{-17.1,74.6},{-12.9,79.1},{-8.64,79.8},{-4.42,76.6},{-0.2,69.7},{4.02,59.4},{8.84,44.1},{14.9,21.2},{27.5,-30.8},{33,-50.2},{37.8,-64.2},{42,-73.1},{46.2,-78.4},{50.5,-80},{54.7,-77.6},{58.9,-71.5},{63.1,-61.9},{67.9,-47.2},{74,-24.8},{80,0}}, thickness=0.5, smooth=Smooth.Bezier),Line(visible=true, points={{-41,-2},{-80,-2}}, thickness=0.5),Text(visible=true, fillColor={160,160,160}, extent={{-128,-11},{-82,7}}, textString="offset", fontName="Arial"),Line(visible=true, points={{-41,-2},{-41,-40}}, color={192,192,192}, pattern=LinePattern.Dot),Text(visible=true, fillColor={160,160,160}, extent={{-60,-61},{-14,-43}}, textString="startTime", fontName="Arial"),Text(visible=true, fillColor={160,160,160}, extent={{84,-72},{108,-52}}, textString="time", fontName="Arial"),Text(visible=true, fillColor={160,160,160}, extent={{-74,86},{-33,106}}, textString="y", fontName="Arial"),Line(visible=true, points={{-9,79},{43,79}}, color={192,192,192}, pattern=LinePattern.Dot),Line(visible=true, points={{-42,-1},{50,0}}, color={192,192,192}, pattern=LinePattern.Dot),Polygon(visible=true, lineColor={192,192,192}, fillColor={192,192,192}, fillPattern=FillPattern.Solid, points={{33,80},{30,67},{37,67},{33,80}}),Text(visible=true, fillColor={160,160,160}, extent={{37,39},{83,57}}, textString="amplitude", fontName="Arial"),Polygon(visible=true, lineColor={192,192,192}, fillColor={192,192,192}, fillPattern=FillPattern.Solid, points={{33,1},{30,14},{36,14},{33,1},{33,1}}),Line(visible=true, points={{33,79},{33,0}}, color={192,192,192})}), Icon(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10}), graphics={Line(visible=true, points={{-80,68},{-80,-80}}, color={192,192,192}),Polygon(visible=true, lineColor={192,192,192}, fillColor={192,192,192}, fillPattern=FillPattern.Solid, points={{-80,90},{-88,68},{-72,68},{-80,90}}),Line(visible=true, points={{-90,0},{68,0}}, color={192,192,192}),Polygon(visible=true, lineColor={192,192,192}, fillColor={192,192,192}, fillPattern=FillPattern.Solid, points={{90,0},{68,8},{68,-8},{90,0}}),Line(visible=true, points={{-80,0},{-68.7,34.2},{-61.5,53.1},{-55.1,66.4},{-49.4,74.6},{-43.8,79.1},{-38.2,79.8},{-32.6,76.6},{-26.9,69.7},{-21.3,59.4},{-14.9,44.1},{-6.83,21.2},{10.1,-30.8},{17.3,-50.2},{23.7,-64.2},{29.3,-73.1},{35,-78.4},{40.6,-80},{46.2,-77.6},{51.9,-71.5},{57.5,-61.9},{63.9,-47.2},{72,-24.8},{80,0}}, smooth=Smooth.Bezier),Text(visible=true, extent={{-147,-152},{153,-112}}, textString="freqHz=%freqHz", fontName="Arial")}));
|
|---|
| 272 | protected
|
|---|
| 273 | constant Real pi=Modelica.Constants.pi;
|
|---|
| 274 | annotation(Icon(coordinateSystem(extent={{-100,-100},{100,100}}), graphics={Line(points={{-80,68},{-80,-80}}, color={192,192,192}),Polygon(points={{-80,90},{-88,68},{-72,68},{-80,90}}, fillPattern=FillPattern.Solid, lineColor={192,192,192}, fillColor={192,192,192}),Line(points={{-90,0},{68,0}}, color={192,192,192}),Polygon(points={{90,0},{68,8},{68,-8},{90,0}}, fillPattern=FillPattern.Solid, lineColor={192,192,192}, fillColor={192,192,192}),Line(points={{-80,0},{-68.7,34.2},{-61.5,53.1},{-55.1,66.4},{-49.4,74.6},{-43.8,79.1},{-38.2,79.8},{-32.6,76.6},{-26.9,69.7},{-21.3,59.4},{-14.9,44.1},{-6.83,21.2},{10.1,-30.8},{17.3,-50.2},{23.7,-64.2},{29.3,-73.1},{35,-78.4},{40.6,-80},{46.2,-77.6},{51.9,-71.5},{57.5,-61.9},{63.9,-47.2},{72,-24.8},{80,0}}, color={0,0,0}),Text(extent={{-147,-152},{153,-112}}, textString="freqHz=%freqHz", fillColor={0,0,0})}), Diagram(coordinateSystem(extent={{-100,-100},{100,100}}), graphics={Line(points={{-80,-90},{-80,84}}, color={192,192,192}),Polygon(points={{-80,100},{-86,84},{-74,84},{-80,100}}, fillPattern=FillPattern.Solid, lineColor={192,192,192}, fillColor={192,192,192}),Line(points={{-99,-40},{85,-40}}, color={192,192,192}),Polygon(points={{101,-40},{85,-34},{85,-46},{101,-40}}, fillPattern=FillPattern.Solid, lineColor={192,192,192}, fillColor={192,192,192}),Line(points={{-40,0},{-31.6,34.2},{-26.1,53.1},{-21.3,66.4},{-17.1,74.6},{-12.9,79.1},{-8.64,79.8},{-4.42,76.6},{-0.201,69.7},{4.02,59.4},{8.84,44.1},{14.9,21.2},{27.5,-30.8},{33,-50.2},{37.8,-64.2},{42,-73.1},{46.2,-78.4},{50.5,-80},{54.7,-77.6},{58.9,-71.5},{63.1,-61.9},{67.9,-47.2},{74,-24.8},{80,0}}, color={0,0,0}, thickness=0.5),Line(points={{-41,-2},{-80,-2}}, color={0,0,0}, thickness=0.5),Text(extent={{-128,7},{-82,-11}}, textString="offset", fillColor={160,160,160}),Line(points={{-41,-2},{-41,-40}}, color={192,192,192}, pattern=LinePattern.Dash),Text(extent={{-60,-43},{-14,-61}}, textString="startTime", fillColor={160,160,160}),Text(extent={{84,-52},{108,-72}}, textString="time", fillColor={160,160,160}),Text(extent={{-74,106},{-33,86}}, textString="y", fillColor={160,160,160}),Line(points={{-9,79},{43,79}}, color={192,192,192}, pattern=LinePattern.Dash),Line(points={{-42,-1},{50,0}}, color={192,192,192}, pattern=LinePattern.Dash),Polygon(points={{33,80},{30,67},{37,67},{33,80}}, lineColor={192,192,192}, fillColor={192,192,192}, fillPattern=FillPattern.Solid),Text(extent={{37,57},{83,39}}, textString="amplitude", fillColor={160,160,160}),Polygon(points={{33,1},{30,14},{36,14},{33,1},{33,1}}, lineColor={192,192,192}, fillColor={192,192,192}, fillPattern=FillPattern.Solid),Line(points={{33,79},{33,0}}, color={192,192,192}, pattern=LinePattern.Solid, thickness=0.25, arrow={Arrow.None,Arrow.None})}), Documentation(info="<html>
|
|---|
| 275 |
|
|---|
| 276 | </html>"));
|
|---|
| 277 | equation
|
|---|
| 278 | y=offset + (if time < startTime then 0 else amplitude*Modelica.Math.sin(2*pi*freqHz*(time - startTime) + phase));
|
|---|
| 279 | end Sine;
|
|---|
| 280 |
|
|---|
| 281 | block Pulse "Generate pulse signal of type Real"
|
|---|
| 282 | parameter Real amplitude=1 "Amplitude of pulse";
|
|---|
| 283 | parameter Real width(final min=Modelica.Constants.small, final max=100)=50 "Width of pulse in % of periods";
|
|---|
| 284 | parameter Modelica.SIunits.Time period(final min=Modelica.Constants.small)=1 "Time for one period";
|
|---|
| 285 | parameter Real offset=0 "Offset of output signals";
|
|---|
| 286 | parameter Modelica.SIunits.Time startTime=0 "Output = offset for time < startTime";
|
|---|
| 287 | extends Modelica.Blocks.Interfaces.SO;
|
|---|
| 288 | annotation(Icon(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10}), graphics={Line(visible=true, points={{-80,68},{-80,-80}}, color={192,192,192}),Polygon(visible=true, lineColor={192,192,192}, fillColor={192,192,192}, fillPattern=FillPattern.Solid, points={{-80,90},{-88,68},{-72,68},{-80,90}}),Line(visible=true, points={{-90,-70},{82,-70}}, color={192,192,192}),Polygon(visible=true, lineColor={192,192,192}, fillColor={192,192,192}, fillPattern=FillPattern.Solid, points={{90,-70},{68,-62},{68,-78},{90,-70}}),Line(visible=true, points={{-80,-70},{-40,-70},{-40,44},{0,44},{0,-70},{40,-70},{40,44},{79,44}}),Text(visible=true, extent={{-147,-152},{153,-112}}, textString="period=%period", fontName="Arial")}), Diagram(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10}), graphics={Polygon(visible=true, lineColor={192,192,192}, fillColor={192,192,192}, fillPattern=FillPattern.Solid, points={{-80,90},{-88,68},{-72,68},{-80,90}}),Line(visible=true, points={{-80,68},{-80,-80}}, color={192,192,192}),Line(visible=true, points={{-90,-70},{82,-70}}, color={192,192,192}),Polygon(visible=true, lineColor={192,192,192}, fillColor={192,192,192}, fillPattern=FillPattern.Solid, points={{90,-70},{68,-62},{68,-78},{90,-70}}),Polygon(visible=true, lineColor={192,192,192}, fillColor={192,192,192}, fillPattern=FillPattern.Solid, points={{-34,1},{-37,-12},{-30,-12},{-34,1}}),Line(visible=true, points={{-34,-1},{-34,-70}}, color={192,192,192}),Polygon(visible=true, lineColor={192,192,192}, fillColor={192,192,192}, fillPattern=FillPattern.Solid, points={{-33,-70},{-36,-57},{-30,-57},{-33,-70},{-33,-70}}),Text(visible=true, fillColor={160,160,160}, extent={{-78,-36},{-35,-24}}, textString="offset", fontName="Arial"),Text(visible=true, fillColor={160,160,160}, extent={{-31,-87},{15,-69}}, textString="startTime", fontName="Arial"),Text(visible=true, fillColor={160,160,160}, extent={{-76,79},{-35,99}}, textString="y", fontName="Arial"),Text(visible=true, fillColor={160,160,160}, extent={{70,-100},{94,-80}}, textString="time", fontName="Arial"),Line(visible=true, points={{-10,0},{-10,-70}}, color={192,192,192}, pattern=LinePattern.Dash),Line(visible=true, points={{-80,0},{-10,0},{-10,50},{30,50},{30,0},{50,0},{50,50},{90,50}}, thickness=0.5),Line(visible=true, points={{-10,88},{-10,49}}, color={192,192,192}, pattern=LinePattern.Dash),Line(visible=true, points={{30,74},{30,50}}, color={160,160,160}, pattern=LinePattern.Dash),Line(visible=true, points={{50,88},{50,50}}, color={192,192,192}, pattern=LinePattern.Dash),Line(visible=true, points={{-10,83},{51,83}}, color={192,192,192}),Line(visible=true, points={{-10,69},{30,69}}, color={192,192,192}),Text(visible=true, fillColor={160,160,160}, extent={{0,85},{46,97}}, textString="period", fontName="Arial"),Text(visible=true, fillColor={160,160,160}, extent={{-9,69},{30,81}}, textString="width", fontName="Arial"),Line(visible=true, points={{-43,50},{-10,50}}, color={192,192,192}, pattern=LinePattern.Dash),Line(visible=true, points={{-34,50},{-34,1}}, color={192,192,192}),Text(visible=true, fillColor={160,160,160}, extent={{-78,20},{-37,34}}, textString="amplitude", fontName="Arial"),Polygon(visible=true, lineColor={192,192,192}, fillColor={192,192,192}, fillPattern=FillPattern.Solid, points={{-34,49},{-37,36},{-30,36},{-34,49}}),Polygon(visible=true, lineColor={192,192,192}, fillColor={192,192,192}, fillPattern=FillPattern.Solid, points={{-34,1},{-37,14},{-31,14},{-34,1},{-34,1}}),Line(visible=true, points={{90,50},{90,0},{100,0}}, thickness=0.5),Polygon(visible=true, lineColor={192,192,192}, fillColor={192,192,192}, fillPattern=FillPattern.Solid, points={{-10,69},{-1,71},{-1,67},{-10,69}}),Polygon(visible=true, lineColor={192,192,192}, fillColor={192,192,192}, fillPattern=FillPattern.Solid, points={{30,69},{22,71},{22,67},{30,69}}),Polygon(visible=true, lineColor={192,192,192}, fillColor={192,192,192}, fillPattern=FillPattern.Solid, points={{-10,83},{-1,85},{-1,81},{-10,83}}),Polygon(visible=true, lineColor={192,192,192}, fillColor={192,192,192}, fillPattern=FillPattern.Solid, points={{50,83},{42,85},{42,81},{50,83}})}), Documentation(info="<html>
|
|---|
| 289 |
|
|---|
| 290 | </html>"));
|
|---|
| 291 | protected
|
|---|
| 292 | Modelica.SIunits.Time T0(final start=startTime) "Start time of current period";
|
|---|
| 293 | Modelica.SIunits.Time T_width=period*width/100;
|
|---|
| 294 | equation
|
|---|
| 295 | when sample(startTime, period) then
|
|---|
| 296 | T0=time;
|
|---|
| 297 | end when;
|
|---|
| 298 | y=offset + (if time < startTime or time >= T0 + T_width then 0 else amplitude);
|
|---|
| 299 | end Pulse;
|
|---|
| 300 |
|
|---|
| 301 | block IntegerStep "Generate step signal of type Integer"
|
|---|
| 302 | parameter Integer height=1 "Height of step";
|
|---|
| 303 | extends Interfaces.IntegerSignalSource;
|
|---|
| 304 | annotation(Icon(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10}), graphics={Line(visible=true, points={{-80,68},{-80,-80}}, color={192,192,192}),Polygon(visible=true, lineColor={192,192,192}, fillColor={192,192,192}, fillPattern=FillPattern.Solid, points={{-80,90},{-88,68},{-72,68},{-80,90}}),Line(visible=true, points={{-90,-70},{82,-70}}, color={192,192,192}),Polygon(visible=true, lineColor={192,192,192}, fillColor={192,192,192}, fillPattern=FillPattern.Solid, points={{90,-70},{68,-62},{68,-78},{90,-70}}),Line(visible=true, points={{-80,-70},{0,-70},{0,50},{80,50}}),Text(visible=true, extent={{-150,-150},{150,-110}}, textString="startTime=%startTime", fontName="Arial")}), Diagram(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10}), graphics={Polygon(visible=true, lineColor={192,192,192}, fillColor={192,192,192}, fillPattern=FillPattern.Solid, points={{-80,90},{-88,68},{-72,68},{-80,90}}),Line(visible=true, points={{-80,68},{-80,-80}}, color={192,192,192}),Line(visible=true, points={{-80,-18},{0,-18},{0,50},{80,50}}, thickness=0.5),Line(visible=true, points={{-90,-70},{82,-70}}, color={192,192,192}),Polygon(visible=true, lineColor={192,192,192}, fillColor={192,192,192}, fillPattern=FillPattern.Solid, points={{90,-70},{68,-62},{68,-78},{90,-70}}),Text(visible=true, fillColor={160,160,160}, extent={{70,-100},{94,-80}}, textString="time", fontName="Arial"),Text(visible=true, fillColor={160,160,160}, extent={{-21,-90},{25,-72}}, textString="startTime", fontName="Arial"),Line(visible=true, points={{0,-17},{0,-71}}, color={192,192,192}, pattern=LinePattern.Dash),Text(visible=true, fillColor={160,160,160}, extent={{-68,-54},{-22,-36}}, textString="offset", fontName="Arial"),Line(visible=true, points={{-13,50},{-13,-17}}, color={192,192,192}),Polygon(visible=true, lineColor={192,192,192}, pattern=LinePattern.Dash, points={{2,50},{-19,50},{2,50}}),Polygon(visible=true, lineColor={192,192,192}, fillColor={192,192,192}, fillPattern=FillPattern.Solid, points={{-13,-17},{-16,-4},{-10,-4},{-13,-17},{-13,-17}}),Polygon(visible=true, lineColor={192,192,192}, fillColor={192,192,192}, fillPattern=FillPattern.Solid, points={{-13,50},{-16,37},{-9,37},{-13,50}}),Text(visible=true, fillColor={160,160,160}, extent={{-68,8},{-22,26}}, textString="height", fontName="Arial"),Polygon(visible=true, lineColor={192,192,192}, fillColor={192,192,192}, fillPattern=FillPattern.Solid, points={{-13,-69},{-16,-56},{-10,-56},{-13,-69},{-13,-69}}),Line(visible=true, points={{-13,-18},{-13,-70}}, color={192,192,192}),Polygon(visible=true, lineColor={192,192,192}, fillColor={192,192,192}, fillPattern=FillPattern.Solid, points={{-13,-18},{-16,-31},{-9,-31},{-13,-18}}),Text(visible=true, fillColor={160,160,160}, extent={{-72,80},{-31,100}}, textString="outPort", fontName="Arial")}), Documentation(info="<html>
|
|---|
| 305 |
|
|---|
| 306 | </html>"));
|
|---|
| 307 | equation
|
|---|
| 308 | y=offset + (if time < startTime then 0 else height);
|
|---|
| 309 | end IntegerStep;
|
|---|
| 310 |
|
|---|
| 311 | end Sources;
|
|---|
| 312 |
|
|---|
| 313 | package Routing "Blocks to combine and extract signals"
|
|---|
| 314 | extends Icons.Library;
|
|---|
| 315 | block Extractor "Extract scalar signal out of signal vector dependent on IntegerRealInput index"
|
|---|
| 316 | extends Modelica.Blocks.Interfaces.MISO;
|
|---|
| 317 | parameter Boolean allowOutOfRange=false "Index may be out of range";
|
|---|
| 318 | parameter Real outOfRangeValue=10000000000.0 "Output signal if index is out of range";
|
|---|
| 319 | annotation(Icon(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10}), graphics={Rectangle(visible=true, lineColor={0,0,255}, fillColor={255,255,255}, fillPattern=FillPattern.Solid, extent={{-80,-50},{-40,50}}),Polygon(visible=true, lineColor={0,0,255}, fillPattern=FillPattern.Solid, points={{-84.4104,1.9079},{-84.4104,-2.09208},{-80.4104,-0.09208},{-84.4104,1.9079}}),Line(visible=true, points={{-62,2},{-50.1395,12.907},{-39.1395,12.907}}, color={0,0,255}),Line(visible=true, points={{-63,4},{-49,40},{-39,40}}, color={0,0,255}),Line(visible=true, points={{-102,0},{-65.0373,-0.01802}}, color={0,0,255}),Ellipse(visible=true, lineColor={0,0,255}, fillColor={0,0,255}, fillPattern=FillPattern.Solid, extent={{-70.0437,-4.90745},{-60.0437,4.5925}}),Line(visible=true, points={{-63,-5},{-50,-40},{-39,-40}}, color={0,0,255}),Line(visible=true, points={{-62,-2},{-50.0698,-12.907},{-39.0698,-12.907}}, color={0,0,255}),Polygon(visible=true, lineColor={0,0,255}, fillColor={255,255,255}, fillPattern=FillPattern.Solid, points={{-38.8808,-11},{-38.8808,-15},{-34.8808,-13},{-38.8808,-11}}),Polygon(visible=true, lineColor={0,0,255}, fillColor={255,255,255}, fillPattern=FillPattern.Solid, points={{-39,42},{-39,38},{-35,40},{-39,42}}),Polygon(visible=true, lineColor={0,0,255}, fillColor={255,255,255}, fillPattern=FillPattern.Solid, points={{-38.8728,-38.0295},{-38.8728,-42.0295},{-34.8728,-40.0295},{-38.8728,-38.0295}}),Polygon(visible=true, lineColor={0,0,255}, fillColor={255,255,255}, fillPattern=FillPattern.Solid, points={{-38.9983,14.8801},{-38.9983,10.8801},{-34.9983,12.8801},{-38.9983,14.8801}}),Rectangle(visible=true, fillColor={235,235,235}, fillPattern=FillPattern.Solid, extent={{-30,-50},{30,50}}),Line(visible=true, points={{100,0},{0,0}}, color={127,0,255}),Line(visible=true, points={{0,2},{0,-104}}, color={255,127,0}),Line(visible=true, points={{-35,40},{-20,40}}, color={127,0,255}),Line(visible=true, points={{-35,13},{-20,13}}, color={127,0,255}),Line(visible=true, points={{-35,-13},{-20,-13}}, color={127,0,255}),Line(visible=true, points={{-35,-40},{-20,-40}}, color={127,0,255}),Polygon(visible=true, lineColor={127,0,255}, fillPattern=FillPattern.Solid, points={{0,0},{-18,13},{-20,13},{-2,0},{0,0}}),Ellipse(visible=true, lineColor={255,127,0}, fillColor={255,127,0}, fillPattern=FillPattern.Solid, extent={{-6,-6},{6,6}})}), Documentation(info="<html>
|
|---|
| 320 | <p>This block extracts a scalar output signal out the
|
|---|
| 321 | vector of input signals dependent on the Integer
|
|---|
| 322 | value of the additional u index:</p>
|
|---|
| 323 | <pre> y = u [ index ] ;
|
|---|
| 324 | </pre>
|
|---|
| 325 | <p>where index is an additional Integer input signal.</p>
|
|---|
| 326 | </html>"), Diagram(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10})));
|
|---|
| 327 | Modelica.Blocks.Interfaces.IntegerInput index annotation(Placement(visible=true, transformation(origin={0,-120}, extent={{-20,-20},{20,20}}, rotation=-270), iconTransformation(origin={0,-120}, extent={{-20,-20},{20,20}}, rotation=-270)));
|
|---|
| 328 | protected
|
|---|
| 329 | Real k[nin];
|
|---|
| 330 | equation
|
|---|
| 331 | when {initial(),change(index)} then
|
|---|
| 332 | for i in 1:nin loop
|
|---|
| 333 | k[i]=if index == i then 1 else 0;
|
|---|
| 334 | end for;
|
|---|
| 335 | end when;
|
|---|
| 336 | y=if not allowOutOfRange or index > 0 and index <= nin then k*u else outOfRangeValue;
|
|---|
| 337 | end Extractor;
|
|---|
| 338 |
|
|---|
| 339 | annotation(Documentation(info="<html>
|
|---|
| 340 | <p>
|
|---|
| 341 | This package contains blocks to combine and extract signals.
|
|---|
| 342 | </p>
|
|---|
| 343 | </html>"), Icon(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10})), Diagram(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10})));
|
|---|
| 344 | end Routing;
|
|---|
| 345 |
|
|---|
| 346 | package Interfaces "Connectors and partial models for input/output blocks"
|
|---|
| 347 | import Modelica.SIunits;
|
|---|
| 348 | extends Modelica.Icons.Library;
|
|---|
| 349 | annotation(preferedView="info", Documentation(info="<HTML>
|
|---|
| 350 | <p>
|
|---|
| 351 | This package contains interface definitions for
|
|---|
| 352 | <b>continuous</b> input/output blocks with Real,
|
|---|
| 353 | Integer and Boolean signals. Furthermore, it contains
|
|---|
| 354 | partial models for continuous and discrete blocks.
|
|---|
| 355 | </p>
|
|---|
| 356 |
|
|---|
| 357 | </HTML>
|
|---|
| 358 | ", revisions="<html>
|
|---|
| 359 | <ul>
|
|---|
| 360 | <li><i>Oct. 21, 2002</i>
|
|---|
| 361 | by <a href=\"http://www.robotic.dlr.de/Martin.Otter/\">Martin Otter</a>
|
|---|
| 362 | and <a href=\"http://www.robotic.dlr.de/Christian.Schweiger/\">Christian Schweiger</a>:<br>
|
|---|
| 363 | Added several new interfaces. <a href=\"../Documentation/ChangeNotes1.5.html\">Detailed description</a> available.
|
|---|
| 364 | <li><i>Oct. 24, 1999</i>
|
|---|
| 365 | by <a href=\"http://www.robotic.dlr.de/Martin.Otter/\">Martin Otter</a>:<br>
|
|---|
| 366 | RealInputSignal renamed to RealInput. RealOutputSignal renamed to
|
|---|
| 367 | output RealOutput. GraphBlock renamed to BlockIcon. SISOreal renamed to
|
|---|
| 368 | SISO. SOreal renamed to SO. I2SOreal renamed to M2SO.
|
|---|
| 369 | SignalGenerator renamed to SignalSource. Introduced the following
|
|---|
| 370 | new models: MIMO, MIMOs, SVcontrol, MVcontrol, DiscreteBlockIcon,
|
|---|
| 371 | DiscreteBlock, DiscreteSISO, DiscreteMIMO, DiscreteMIMOs,
|
|---|
| 372 | BooleanBlockIcon, BooleanSISO, BooleanSignalSource, MI2BooleanMOs.</li>
|
|---|
| 373 | <li><i>June 30, 1999</i>
|
|---|
| 374 | by <a href=\"http://www.robotic.dlr.de/Martin.Otter/\">Martin Otter</a>:<br>
|
|---|
| 375 | Realized a first version, based on an existing Dymola library
|
|---|
| 376 | of Dieter Moormann and Hilding Elmqvist.</li>
|
|---|
| 377 | </ul>
|
|---|
| 378 | </html>
|
|---|
| 379 | "), Icon(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10})), Diagram(coordinateSystem(extent={{0,0},{733,-491}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10})));
|
|---|
| 380 | connector RealSignal "Real port (both input/output possible)"
|
|---|
| 381 | replaceable type SignalType= Real annotation(Icon(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10})), Diagram(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10})));
|
|---|
| 382 | extends SignalType;
|
|---|
| 383 | annotation(Documentation(info="<html>
|
|---|
| 384 | <p>
|
|---|
| 385 | Connector with one signal of type Real (no icon, no input/output prefix).
|
|---|
| 386 | </p>
|
|---|
| 387 | </html>"), Icon(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10})), Diagram(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10})));
|
|---|
| 388 | end RealSignal;
|
|---|
| 389 |
|
|---|
| 390 | connector IntegerSignal= Integer "Integer port (both input/output possible)" annotation(Documentation(info="<html>
|
|---|
| 391 | <p>
|
|---|
| 392 | Connector with one signal of type Icon (no icon, no input/output prefix).
|
|---|
| 393 | </p>
|
|---|
| 394 | </html>"), Icon(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10})), Diagram(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10})));
|
|---|
| 395 | connector RealInput= input RealSignal "'input Real' as connector" annotation(defaultComponentName="u", Documentation(info="<html>
|
|---|
| 396 | <p>
|
|---|
| 397 | Connector with one input signal of type Real.
|
|---|
| 398 | </p>
|
|---|
| 399 | </html>"), Icon(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10}), graphics={Polygon(visible=true, lineColor={0,0,127}, fillColor={0,0,127}, fillPattern=FillPattern.Solid, points={{-100,100},{100,0},{-100,-100},{-100,100}})}), Diagram(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10}), graphics={Polygon(visible=true, lineColor={0,0,127}, fillColor={0,0,127}, fillPattern=FillPattern.Solid, points={{0,50},{100,0},{0,-50},{0,50}}),Text(visible=true, fillColor={0,0,127}, extent={{-120,60},{100,105}}, textString="%name", fontName="Arial")}));
|
|---|
| 400 | connector RealOutput= output RealSignal "'output Real' as connector" annotation(defaultComponentName="y", Documentation(info="<html>
|
|---|
| 401 | <p>
|
|---|
| 402 | Connector with one output signal of type Real.
|
|---|
| 403 | </p>
|
|---|
| 404 | </html>"), Icon(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10}), graphics={Polygon(visible=true, lineColor={0,0,127}, fillColor={255,255,255}, fillPattern=FillPattern.Solid, points={{-100,100},{100,0},{-100,-100},{-100,100}})}), Diagram(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10}), graphics={Polygon(visible=true, lineColor={0,0,127}, fillColor={255,255,255}, fillPattern=FillPattern.Solid, points={{-100,50},{0,0},{-100,-50},{-100,50}}),Text(visible=true, fillColor={0,0,127}, extent={{-100,60},{130,140}}, textString="%name", fontName="Arial")}));
|
|---|
| 405 | connector IntegerInput= input IntegerSignal "'input Integer' as connector" annotation(defaultComponentName="u", Documentation(info="<html>
|
|---|
| 406 | <p>
|
|---|
| 407 | Connector with one input signal of type Integer.
|
|---|
| 408 | </p>
|
|---|
| 409 | </html>"), Icon(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10}), graphics={Polygon(visible=true, lineColor={255,127,0}, fillColor={255,127,0}, fillPattern=FillPattern.Solid, points={{-100,100},{100,0},{-100,-100},{-100,100}})}), Diagram(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10}), graphics={Polygon(visible=true, lineColor={255,127,0}, fillColor={255,127,0}, fillPattern=FillPattern.Solid, points={{0,50},{100,0},{0,-50},{0,50}}),Text(visible=true, fillColor={255,127,0}, extent={{-120,60},{100,105}}, textString="%name", fontName="Arial")}));
|
|---|
| 410 | connector IntegerOutput= output IntegerSignal "'output Integer' as connector" annotation(defaultComponentName="y", Documentation(info="<html>
|
|---|
| 411 | <p>
|
|---|
| 412 | Connector with one output signal of type Integer.
|
|---|
| 413 | </p>
|
|---|
| 414 | </html>"), Icon(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10}), graphics={Polygon(visible=true, lineColor={255,127,0}, fillColor={255,255,255}, fillPattern=FillPattern.Solid, points={{-100,100},{100,0},{-100,-100},{-100,100}})}), Diagram(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10}), graphics={Polygon(visible=true, lineColor={255,127,0}, fillColor={255,255,255}, fillPattern=FillPattern.Solid, points={{-100,50},{0,0},{-100,-50},{-100,50}}),Text(visible=true, fillColor={255,127,0}, extent={{-100,60},{130,140}}, textString="%name", fontName="Arial")}));
|
|---|
| 415 | partial block BlockIcon "Basic graphical layout of input/output block"
|
|---|
| 416 | annotation(Documentation(info="<html>
|
|---|
| 417 | <p>
|
|---|
| 418 | Block that has only the basic icon for an input/output
|
|---|
| 419 | block (no declarations, no equations). Most blocks
|
|---|
| 420 | of package Modelica.Blocks inherit directly or indirectly
|
|---|
| 421 | from this block.
|
|---|
| 422 | </p>
|
|---|
| 423 | </html>"), Icon(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10}), graphics={Rectangle(visible=true, lineColor={0,0,127}, fillColor={255,255,255}, fillPattern=FillPattern.Solid, extent={{-100,-100},{100,100}}),Text(visible=true, fillColor={0,0,255}, fillPattern=FillPattern.Solid, extent={{-150,110},{150,150}}, textString="%name", fontName="Arial")}), Diagram(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10})));
|
|---|
| 424 | end BlockIcon;
|
|---|
| 425 |
|
|---|
| 426 | partial block SO "Single Output continuous control block"
|
|---|
| 427 | extends BlockIcon;
|
|---|
| 428 | annotation(Diagram(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10})), Documentation(info="<html>
|
|---|
| 429 | <p>
|
|---|
| 430 | Block has one continuous Real output signal.
|
|---|
| 431 | </p>
|
|---|
| 432 | </html>"), Icon(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10})));
|
|---|
| 433 | RealOutput y "Connector of Real output signal" annotation(Placement(visible=true, transformation(origin={110,0}, extent={{-10,-10},{10,10}}, rotation=0), iconTransformation(origin={110,0}, extent={{-10,-10},{10,10}}, rotation=0)));
|
|---|
| 434 | end SO;
|
|---|
| 435 |
|
|---|
| 436 | partial block MISO "Multiple Input Single Output continuous control block"
|
|---|
| 437 | extends BlockIcon;
|
|---|
| 438 | parameter Integer nin=1 "Number of inputs";
|
|---|
| 439 | annotation(Documentation(info="<HTML>
|
|---|
| 440 | <p>
|
|---|
| 441 | Block has a vector of continuous Real input signals and
|
|---|
| 442 | one continuous Real output signal.
|
|---|
| 443 | </p>
|
|---|
| 444 | </HTML>
|
|---|
| 445 | "), Icon(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10})), Diagram(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10})));
|
|---|
| 446 | RealInput u[nin] "Connector of Real input signals" annotation(Placement(visible=true, transformation(origin={-120,0}, extent={{-20,-20},{20,20}}, rotation=0), iconTransformation(origin={-120,0}, extent={{-20,-20},{20,20}}, rotation=0)));
|
|---|
| 447 | RealOutput y "Connector of Real output signal" annotation(Placement(visible=true, transformation(origin={110,0}, extent={{-10,-10},{10,10}}, rotation=0), iconTransformation(origin={110,0}, extent={{-10,-10},{10,10}}, rotation=0)));
|
|---|
| 448 | end MISO;
|
|---|
| 449 |
|
|---|
| 450 | partial block IntegerBlockIcon "Basic graphical layout of Integer block"
|
|---|
| 451 | annotation(Documentation(info="<html>
|
|---|
| 452 | <p>
|
|---|
| 453 | Block that has only the basic icon for an input/output,
|
|---|
| 454 | Integer block (no declarations, no equations).
|
|---|
| 455 | </p>
|
|---|
| 456 | </html>"), Icon(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10}), graphics={Rectangle(visible=true, lineColor={255,127,0}, fillColor={255,255,255}, fillPattern=FillPattern.Solid, extent={{-100,-100},{100,100}}),Text(visible=true, fillColor={0,0,255}, fillPattern=FillPattern.Solid, extent={{-150,110},{150,150}}, textString="%name", fontName="Arial")}), Diagram(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10})));
|
|---|
| 457 | end IntegerBlockIcon;
|
|---|
| 458 |
|
|---|
| 459 | partial block IntegerSO "Single Integer Output continuous control block"
|
|---|
| 460 | extends IntegerBlockIcon;
|
|---|
| 461 | annotation(Documentation(info="<html>
|
|---|
| 462 | <p>
|
|---|
| 463 | Block has one continuous Integer output signal.
|
|---|
| 464 | </p>
|
|---|
| 465 | </html>"), Icon(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10})), Diagram(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10})));
|
|---|
| 466 | IntegerOutput y "Connector of Integer output signal" annotation(Placement(visible=true, transformation(origin={110,0}, extent={{-10,-10},{10,10}}, rotation=0), iconTransformation(origin={110,0}, extent={{-10,-10},{10,10}}, rotation=0)));
|
|---|
| 467 | end IntegerSO;
|
|---|
| 468 |
|
|---|
| 469 | partial block IntegerSignalSource "Base class for continuous Integer signal source"
|
|---|
| 470 | extends IntegerSO;
|
|---|
| 471 | parameter Integer offset=0 "offset of output signal";
|
|---|
| 472 | parameter SI.Time startTime=0 "y = offset for time < startTime";
|
|---|
| 473 | annotation(Documentation(info="<html>
|
|---|
| 474 | <p>
|
|---|
| 475 | Basic block for Integer sources of package Blocks.Sources.
|
|---|
| 476 | This component has one continuous Integer output signal y
|
|---|
| 477 | and two parameters (offset, startTime) to shift the
|
|---|
| 478 | generated signal.
|
|---|
| 479 | </p>
|
|---|
| 480 | </html>"), Icon(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10})), Diagram(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10})));
|
|---|
| 481 | end IntegerSignalSource;
|
|---|
| 482 |
|
|---|
| 483 | end Interfaces;
|
|---|
| 484 |
|
|---|
| 485 | end Blocks;
|
|---|
| 486 |
|
|---|
| 487 | package SIunits "Type and unit definitions based on SI units according to ISO 31-1992"
|
|---|
| 488 | extends Modelica.Icons.Library2;
|
|---|
| 489 | annotation(preferedView="info", Invisible=true, Icon(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10}), graphics={Text(visible=true, extent={{-63,-67},{45,-13}}, textString="[kg.m2]", fontName="Arial")}), Documentation(info="<html>
|
|---|
| 490 | <p>This package provides predefined types, such as <i>Mass</i>,
|
|---|
| 491 | <i>Angle</i>, <i>Time</i>, based on the international standard
|
|---|
| 492 | on units, e.g.,
|
|---|
| 493 | </p>
|
|---|
| 494 |
|
|---|
| 495 | <pre> <b>type</b> Angle = Real(<b>final</b> quantity = \"Angle\",
|
|---|
| 496 | <b>final</b> unit = \"rad\",
|
|---|
| 497 | displayUnit = \"deg\");
|
|---|
| 498 | </pre>
|
|---|
| 499 |
|
|---|
| 500 | <p>
|
|---|
| 501 | as well as conversion functions from non SI-units to SI-units
|
|---|
| 502 | and vice versa in subpackage
|
|---|
| 503 | <a href=\"Modelica://Modelica.SIunits.Conversions\">Conversions</a>.
|
|---|
| 504 | </p>
|
|---|
| 505 |
|
|---|
| 506 | <p>
|
|---|
| 507 | For an introduction how units are used in the Modelica standard library
|
|---|
| 508 | with package SIunits, have a look at:
|
|---|
| 509 | <a href=\"Modelica://Modelica.SIunits.UsersGuide.HowToUseSIunits\">How to use SIunits</a>.
|
|---|
| 510 | </p>
|
|---|
| 511 |
|
|---|
| 512 | <p>
|
|---|
| 513 | Copyright © 1998-2006, Modelica Association and DLR.
|
|---|
| 514 | </p>
|
|---|
| 515 | <p>
|
|---|
| 516 | <i>This Modelica package is <b>free</b> software; it can be redistributed and/or modified
|
|---|
| 517 | under the terms of the <b>Modelica license</b>, see the license conditions
|
|---|
| 518 | and the accompanying <b>disclaimer</b>
|
|---|
| 519 | <a href=\"Modelica://Modelica.UsersGuide.ModelicaLicense\">here</a>.</i>
|
|---|
| 520 | </p>
|
|---|
| 521 |
|
|---|
| 522 | </html>", revisions="<html>
|
|---|
| 523 | <ul>
|
|---|
| 524 | <li><i>Dec. 14, 2005</i>
|
|---|
| 525 | by <a href=\"http://www.robotic.dlr.de/Martin.Otter/\">Martin Otter</a>:<br>
|
|---|
| 526 | Add users guide and removed \"min\" values for Resistance and Conductance.</li>
|
|---|
| 527 | <li><i>October 21, 2002</i>
|
|---|
| 528 | by <a href=\"http://www.robotic.dlr.de/Martin.Otter/\">Martin Otter</a>
|
|---|
| 529 | and <a href=\"http://www.robotic.dlr.de/Christian.Schweiger/\">Christian Schweiger</a>:<br>
|
|---|
| 530 | Added new package <b>Conversions</b>. Corrected typo <i>Wavelenght</i>.</li>
|
|---|
| 531 | <li><i>June 6, 2000</i>
|
|---|
| 532 | by <a href=\"http://www.robotic.dlr.de/Martin.Otter/\">Martin Otter</a>:<br>
|
|---|
| 533 | Introduced the following new types<br>
|
|---|
| 534 | type Temperature = ThermodynamicTemperature;<br>
|
|---|
| 535 | types DerDensityByEnthalpy, DerDensityByPressure,
|
|---|
| 536 | DerDensityByTemperature, DerEnthalpyByPressure,
|
|---|
| 537 | DerEnergyByDensity, DerEnergyByPressure<br>
|
|---|
| 538 | Attribute \"final\" removed from min and max values
|
|---|
| 539 | in order that these values can still be changed to narrow
|
|---|
| 540 | the allowed range of values.<br>
|
|---|
| 541 | Quantity=\"Stress\" removed from type \"Stress\", in order
|
|---|
| 542 | that a type \"Stress\" can be connected to a type \"Pressure\".</li>
|
|---|
| 543 | <li><i>Oct. 27, 1999</i>
|
|---|
| 544 | by <a href=\"http://www.robotic.dlr.de/Martin.Otter/\">Martin Otter</a>:<br>
|
|---|
| 545 | New types due to electrical library: Transconductance, InversePotential,
|
|---|
| 546 | Damping.</li>
|
|---|
| 547 | <li><i>Sept. 18, 1999</i>
|
|---|
| 548 | by <a href=\"http://www.robotic.dlr.de/Martin.Otter/\">Martin Otter</a>:<br>
|
|---|
| 549 | Renamed from SIunit to SIunits. Subpackages expanded, i.e., the
|
|---|
| 550 | SIunits package, does no longer contain subpackages.</li>
|
|---|
| 551 | <li><i>Aug 12, 1999</i>
|
|---|
| 552 | by <a href=\"http://www.robotic.dlr.de/Martin.Otter/\">Martin Otter</a>:<br>
|
|---|
| 553 | Type \"Pressure\" renamed to \"AbsolutePressure\" and introduced a new
|
|---|
| 554 | type \"Pressure\" which does not contain a minimum of zero in order
|
|---|
| 555 | to allow convenient handling of relative pressure. Redefined
|
|---|
| 556 | BulkModulus as an alias to AbsolutePressure instead of Stress, since
|
|---|
| 557 | needed in hydraulics.</li>
|
|---|
| 558 | <li><i>June 29, 1999</i>
|
|---|
| 559 | by <a href=\"http://www.robotic.dlr.de/Martin.Otter/\">Martin Otter</a>:<br>
|
|---|
| 560 | Bug-fix: Double definition of \"Compressibility\" removed
|
|---|
| 561 | and appropriate \"extends Heat\" clause introduced in
|
|---|
| 562 | package SolidStatePhysics to incorporate ThermodynamicTemperature.</li>
|
|---|
| 563 | <li><i>April 8, 1998</i>
|
|---|
| 564 | by <a href=\"http://www.robotic.dlr.de/Martin.Otter/\">Martin Otter</a>
|
|---|
| 565 | and Astrid Jaschinski:<br>
|
|---|
| 566 | Complete ISO 31 chapters realized.</li>
|
|---|
| 567 | <li><i>Nov. 15, 1997</i>
|
|---|
| 568 | by <a href=\"http://www.robotic.dlr.de/Martin.Otter/\">Martin Otter</a>
|
|---|
| 569 | and <a href=\"http://www.control.lth.se/~hubertus/\">Hubertus Tummescheit</a>:<br>
|
|---|
| 570 | Some chapters realized.</li>
|
|---|
| 571 | </ul>
|
|---|
| 572 | </html>"), Diagram(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10}), graphics={Rectangle(visible=true, fillColor={235,235,235}, fillPattern=FillPattern.Solid, extent={{169,86},{349,236}}),Polygon(visible=true, fillColor={235,235,235}, fillPattern=FillPattern.Solid, points={{169,236},{189,256},{369,256},{349,236},{169,236}}),Polygon(visible=true, fillColor={235,235,235}, fillPattern=FillPattern.Solid, points={{369,256},{369,106},{349,86},{349,236},{369,256}}),Text(visible=true, fillColor={160,160,160}, extent={{179,196},{339,226}}, textString="Library", fontName="Arial"),Text(visible=true, extent={{206,119},{314,173}}, textString="[kg.m2]", fontName="Arial"),Text(visible=true, fillColor={255,0,0}, extent={{163,264},{406,320}}, textString="Modelica.SIunits", fontName="Arial")}));
|
|---|
| 573 | package Conversions "Conversion functions to/from non SI units and type definitions of non SI units"
|
|---|
| 574 | extends Modelica.Icons.Library2;
|
|---|
| 575 | annotation(preferedView="info", Icon(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10}), graphics={Text(visible=true, lineThickness=1, extent={{-92,-67},{-33,-7}}, textString="°C", fontName="Arial"),Text(visible=true, extent={{22,-67},{82,-7}}, textString="K", fontName="Arial"),Line(visible=true, points={{-26,-36},{6,-36}}),Polygon(visible=true, pattern=LinePattern.None, fillPattern=FillPattern.Solid, points={{6,-28},{6,-45},{26,-37},{6,-28}})}), Documentation(info="<HTML>
|
|---|
| 576 | <p>This package provides conversion functions from the non SI Units
|
|---|
| 577 | defined in package Modelica.SIunits.Conversions.NonSIunits to the
|
|---|
| 578 | corresponding SI Units defined in package Modelica.SIunits and vice
|
|---|
| 579 | versa. It is recommended to use these functions in the following
|
|---|
| 580 | way (note, that all functions have one Real input and one Real output
|
|---|
| 581 | argument):</p>
|
|---|
| 582 | <pre>
|
|---|
| 583 | <b>import</b> SI = Modelica.SIunits;
|
|---|
| 584 | <b>import</b> Modelica.SIunits.Conversions.*;
|
|---|
| 585 | ...
|
|---|
| 586 | <b>parameter</b> SI.Temperature T = from_degC(25); // convert 25 degree Celsius to Kelvin
|
|---|
| 587 | <b>parameter</b> SI.Angle phi = from_deg(180); // convert 180 degree to radian
|
|---|
| 588 | <b>parameter</b> SI.AngularVelocity w = from_rpm(3600); // convert 3600 revolutions per minutes
|
|---|
| 589 | // to radian per seconds
|
|---|
| 590 | </pre>
|
|---|
| 591 |
|
|---|
| 592 | </HTML>
|
|---|
| 593 | "), Diagram(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10})));
|
|---|
| 594 | package NonSIunits "Type definitions of non SI units"
|
|---|
| 595 | extends Modelica.Icons.Library2;
|
|---|
| 596 | type Temperature_degC= Real(final quantity="ThermodynamicTemperature", final unit="degC") annotation(Icon(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10})), Diagram(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10})));
|
|---|
| 597 | annotation(preferedView="info", Documentation(info="<HTML>
|
|---|
| 598 | <p>
|
|---|
| 599 | This package provides predefined types, such as <b>Angle_deg</b> (angle in
|
|---|
| 600 | degree), <b>AngularVelocity_rpm</b> (angular velocity in revolutions per
|
|---|
| 601 | minute) or <b>Temperature_degF</b> (temperature in degree Fahrenheit),
|
|---|
| 602 | which are in common use but are not part of the international standard on
|
|---|
| 603 | units according to ISO 31-1992 \"General principles concerning quantities,
|
|---|
| 604 | units and symbols\" and ISO 1000-1992 \"SI units and recommendations for
|
|---|
| 605 | the use of their multiples and of certain other units\".</p>
|
|---|
| 606 | <p>If possible, the types in this package should not be used. Use instead
|
|---|
| 607 | types of package Modelica.SIunits. For more information on units, see also
|
|---|
| 608 | the book of Francois Cardarelli <b>Scientific Unit Conversion - A
|
|---|
| 609 | Practical Guide to Metrication</b> (Springer 1997).</p>
|
|---|
| 610 | <p>Some units, such as <b>Temperature_degC/Temp_C</b> are both defined in
|
|---|
| 611 | Modelica.SIunits and in Modelica.Conversions.NonSIunits. The reason is that these
|
|---|
| 612 | definitions have been placed erroneously in Modelica.SIunits although they
|
|---|
| 613 | are not SIunits. For backward compatibility, these type definitions are
|
|---|
| 614 | still kept in Modelica.SIunits.</p>
|
|---|
| 615 | </HTML>
|
|---|
| 616 | "), Icon(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10}), graphics={Text(visible=true, extent={{-66,-67},{52,-13}}, textString="[rev/min]", fontName="Arial")}), Diagram(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10})));
|
|---|
| 617 | end NonSIunits;
|
|---|
| 618 |
|
|---|
| 619 | end Conversions;
|
|---|
| 620 |
|
|---|
| 621 | type Angle= Real(final quantity="Angle", final unit="rad", displayUnit="deg") annotation(Icon(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10})), Diagram(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10})));
|
|---|
| 622 | type Time= Real(final quantity="Time", final unit="s") annotation(Icon(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10})), Diagram(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10})));
|
|---|
| 623 | type Velocity= Real(final quantity="Velocity", final unit="m/s") annotation(Icon(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10})), Diagram(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10})));
|
|---|
| 624 | type Acceleration= Real(final quantity="Acceleration", final unit="m/s2") annotation(Icon(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10})), Diagram(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10})));
|
|---|
| 625 | type Frequency= Real(final quantity="Frequency", final unit="Hz") annotation(Icon(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10})), Diagram(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10})));
|
|---|
| 626 | end SIunits;
|
|---|
| 627 |
|
|---|
| 628 | package Icons "Icon definitions"
|
|---|
| 629 | annotation(preferedView="info", Documentation(info="<html>
|
|---|
| 630 | <p>
|
|---|
| 631 | This package contains definitions for the graphical layout of
|
|---|
| 632 | components which may be used in different libraries.
|
|---|
| 633 | The icons can be utilized by inheriting them in the desired class
|
|---|
| 634 | using \"extends\".
|
|---|
| 635 | </p>
|
|---|
| 636 | <dl>
|
|---|
| 637 | <dt><b>Main Author:</b>
|
|---|
| 638 | <dd><a href=\"http://www.robotic.dlr.de/Martin.Otter/\">Martin Otter</a><br>
|
|---|
| 639 | Deutsches Zentrum fuer Luft und Raumfahrt e.V. (DLR)<br>
|
|---|
| 640 | Oberpfaffenhofen<br>
|
|---|
| 641 | Postfach 1116<br>
|
|---|
| 642 | D-82230 Wessling<br>
|
|---|
| 643 | email: <A HREF=\"mailto:Martin.Otter@dlr.de\">Martin.Otter@dlr.de</A><br>
|
|---|
| 644 | </dl>
|
|---|
| 645 |
|
|---|
| 646 | <p>
|
|---|
| 647 | Copyright © 1998-2006, Modelica Association and DLR.
|
|---|
| 648 | </p>
|
|---|
| 649 | <p>
|
|---|
| 650 | <i>This Modelica package is <b>free</b> software; it can be redistributed and/or modified
|
|---|
| 651 | under the terms of the <b>Modelica license</b>, see the license conditions
|
|---|
| 652 | and the accompanying <b>disclaimer</b>
|
|---|
| 653 | <a href=\"Modelica://Modelica.UsersGuide.ModelicaLicense\">here</a>.</i>
|
|---|
| 654 | </p><br>
|
|---|
| 655 | </HTML>
|
|---|
| 656 | ", revisions="<html>
|
|---|
| 657 | <ul>
|
|---|
| 658 | <li><i>October 21, 2002</i>
|
|---|
| 659 | by <a href=\"http://www.robotic.dlr.de/Martin.Otter/\">Martin Otter</a>
|
|---|
| 660 | and <a href=\"http://www.robotic.dlr.de/Christian.Schweiger/\">Christian Schweiger</a>:<br>
|
|---|
| 661 | Added new icons <b>Function</b>, <b>Enumerations</b> and <b>Record</b>.</li>
|
|---|
| 662 | <li><i>June 6, 2000</i>
|
|---|
| 663 | by <a href=\"http://www.robotic.dlr.de/Martin.Otter/\">Martin Otter</a>:<br>
|
|---|
| 664 | Replaced <b>model</b> keyword by <b>package</b> if the main
|
|---|
| 665 | usage is for inheriting from a package.<br>
|
|---|
| 666 | New icons <b>GearIcon</b> and <b>MotorIcon</b>.</li>
|
|---|
| 667 | <li><i>Sept. 18, 1999</i>
|
|---|
| 668 | by <a href=\"http://www.robotic.dlr.de/Martin.Otter/\">Martin Otter</a>:<br>
|
|---|
| 669 | Renaming package Icon to Icons.
|
|---|
| 670 | Model Advanced removed (icon not accepted on the Modelica meeting).
|
|---|
| 671 | New model Library2, which is the Library icon with enough place
|
|---|
| 672 | to add library specific elements in the icon. Icon also used in diagram
|
|---|
| 673 | level for models Info, TranslationalSensor, RotationalSensor.</li>
|
|---|
| 674 | <li><i>July 15, 1999</i>
|
|---|
| 675 | by <a href=\"http://www.robotic.dlr.de/Martin.Otter/\">Martin Otter</a>:<br>
|
|---|
| 676 | Model Caution renamed to Advanced, model Sensor renamed to
|
|---|
| 677 | TranslationalSensor, new model RotationalSensor.</li>
|
|---|
| 678 | <li><i>June 30, 1999</i>
|
|---|
| 679 | by <a href=\"http://www.robotic.dlr.de/Martin.Otter/\">Martin Otter</a>:<br>
|
|---|
| 680 | Realized a first version.</li>
|
|---|
| 681 | </ul>
|
|---|
| 682 | <br>
|
|---|
| 683 | </html>"), Icon(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10}), graphics={Rectangle(visible=true, fillColor={235,235,235}, fillPattern=FillPattern.Solid, extent={{-100,-100},{80,50}}),Polygon(visible=true, fillColor={235,235,235}, fillPattern=FillPattern.Solid, points={{-100,50},{-80,70},{100,70},{80,50},{-100,50}}),Polygon(visible=true, fillColor={235,235,235}, fillPattern=FillPattern.Solid, points={{100,70},{100,-80},{80,-100},{80,50},{100,70}}),Text(visible=true, fillColor={255,0,0}, extent={{-120,70},{120,135}}, textString="%name", fontName="Arial"),Text(visible=true, fillColor={160,160,160}, extent={{-90,10},{70,40}}, textString="Library", fontName="Arial"),Rectangle(visible=true, fillColor={235,235,235}, fillPattern=FillPattern.Solid, extent={{-100,-100},{80,50}}),Polygon(visible=true, fillColor={210,210,210}, fillPattern=FillPattern.Solid, points={{-100,50},{-80,70},{100,70},{80,50},{-100,50}}),Polygon(visible=true, fillColor={210,210,210}, fillPattern=FillPattern.Solid, points={{100,70},{100,-80},{80,-100},{80,50},{100,70}}),Text(visible=true, fillColor={160,160,160}, extent={{-90,10},{70,40}}, textString="Library", fontName="Arial"),Polygon(visible=true, fillColor={192,192,192}, fillPattern=FillPattern.Solid, points={{-64,-20},{-50,-4},{50,-4},{36,-20},{-64,-20},{-64,-20}}),Rectangle(visible=true, fillColor={192,192,192}, fillPattern=FillPattern.Solid, extent={{-64,-84},{36,-20}}),Text(visible=true, fillColor={128,128,128}, extent={{-60,-38},{32,-24}}, textString="Library", fontName="Arial"),Polygon(visible=true, fillColor={192,192,192}, fillPattern=FillPattern.Solid, points={{50,-4},{50,-70},{36,-84},{36,-20},{50,-4}})}), Diagram(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10})));
|
|---|
| 684 | partial package Library "Icon for library"
|
|---|
| 685 | annotation(Icon(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10}), graphics={Rectangle(visible=true, fillColor={235,235,235}, fillPattern=FillPattern.Solid, extent={{-100,-100},{80,50}}),Polygon(visible=true, fillColor={210,210,210}, fillPattern=FillPattern.Solid, points={{-100,50},{-80,70},{100,70},{80,50},{-100,50}}),Polygon(visible=true, fillColor={210,210,210}, fillPattern=FillPattern.Solid, points={{100,70},{100,-80},{80,-100},{80,50},{100,70}}),Text(visible=true, fillColor={0,0,255}, extent={{-85,-85},{65,35}}, textString="Library", fontName="Arial"),Text(visible=true, fillColor={255,0,0}, extent={{-120,73},{120,122}}, textString="%name", fontName="Arial")}), Diagram(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10})));
|
|---|
| 686 | end Library;
|
|---|
| 687 |
|
|---|
| 688 | partial package Library2 "Icon for library where additional icon elements shall be added"
|
|---|
| 689 | annotation(Icon(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10}), graphics={Rectangle(visible=true, fillColor={235,235,235}, fillPattern=FillPattern.Solid, extent={{-100,-100},{80,50}}),Polygon(visible=true, fillColor={210,210,210}, fillPattern=FillPattern.Solid, points={{-100,50},{-80,70},{100,70},{80,50},{-100,50}}),Polygon(visible=true, fillColor={210,210,210}, fillPattern=FillPattern.Solid, points={{100,70},{100,-80},{80,-100},{80,50},{100,70}}),Text(visible=true, fillColor={255,0,0}, extent={{-120,70},{120,125}}, textString="%name", fontName="Arial"),Text(visible=true, fillColor={160,160,160}, fillPattern=FillPattern.Solid, extent={{-90,10},{70,40}}, textString="Library", fontName="Arial")}), Diagram(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10})));
|
|---|
| 690 | end Library2;
|
|---|
| 691 |
|
|---|
| 692 | end Icons;
|
|---|
| 693 |
|
|---|
| 694 | package Constants "Mathematical constants and constants of nature (e.g., pi, eps, R, sigma)"
|
|---|
| 695 | import SI = Modelica.SIunits;
|
|---|
| 696 | import NonSI = Modelica.SIunits.Conversions.NonSIunits;
|
|---|
| 697 | extends Modelica.Icons.Library2;
|
|---|
| 698 | constant Real e=Modelica.Math.exp(1.0);
|
|---|
| 699 | constant Real pi=2*Modelica.Math.asin(1.0);
|
|---|
| 700 | constant Real D2R=pi/180 "Degree to Radian";
|
|---|
| 701 | constant Real R2D=180/pi "Radian to Degree";
|
|---|
| 702 | constant Real eps=1e-15 "Biggest number such that 1.0 + eps = 1.0";
|
|---|
| 703 | constant Real small=1e-60 "Smallest number such that small and -small are representable on the machine";
|
|---|
| 704 | constant Real inf=1e+60 "Biggest Real number such that inf and -inf are representable on the machine";
|
|---|
| 705 | constant Integer Integer_inf=1073741823 "Biggest Integer number such that Integer_inf and -Integer_inf are representable on the machine";
|
|---|
| 706 | constant SI.Velocity c=299792458 "Speed of light in vacuum";
|
|---|
| 707 | constant SI.Acceleration g_n=9.80665 "Standard acceleration of gravity on earth";
|
|---|
| 708 | constant Real G(final unit="m3/(kg.s2)")=6.6742e-11 "Newtonian constant of gravitation";
|
|---|
| 709 | constant Real h(final unit="J.s")=6.6260693e-34 "Planck constant";
|
|---|
| 710 | constant Real k(final unit="J/K")=1.3806505e-23 "Boltzmann constant";
|
|---|
| 711 | constant Real R(final unit="J/(mol.K)")=8.314472 "Molar gas constant";
|
|---|
| 712 | constant Real sigma(final unit="W/(m2.K4)")=5.6704e-08 "Stefan-Boltzmann constant";
|
|---|
| 713 | constant Real N_A(final unit="1/mol")=6.0221415e+23 "Avogadro constant";
|
|---|
| 714 | constant Real mue_0(final unit="N/A2")=4*pi*1e-07 "Magnetic constant";
|
|---|
| 715 | constant Real epsilon_0(final unit="F/m")=1/(mue_0*c*c) "Electric constant";
|
|---|
| 716 | constant NonSI.Temperature_degC T_zero=-273.15 "Absolute zero temperature";
|
|---|
| 717 | annotation(Documentation(info="<html>
|
|---|
| 718 | <p>
|
|---|
| 719 | This package provides often needed constants from mathematics, machine
|
|---|
| 720 | dependent constants and constants from nature. The latter constants
|
|---|
| 721 | (name, value, description) are from the following source:
|
|---|
| 722 | </p>
|
|---|
| 723 |
|
|---|
| 724 | <dl>
|
|---|
| 725 | <dt>Peter J. Mohr and Barry N. Taylor (1999):</dt>
|
|---|
| 726 | <dd><b>CODATA Recommended Values of the Fundamental Physical Constants: 1998</b>.
|
|---|
| 727 | Journal of Physical and Chemical Reference Data, Vol. 28, No. 6, 1999 and
|
|---|
| 728 | Reviews of Modern Physics, Vol. 72, No. 2, 2000. See also <a href=
|
|---|
| 729 | \"http://physics.nist.gov/cuu/Constants/\">http://physics.nist.gov/cuu/Constants/</a></dd>
|
|---|
| 730 | </dl>
|
|---|
| 731 |
|
|---|
| 732 | <p>CODATA is the Committee on Data for Science and Technology.</p>
|
|---|
| 733 |
|
|---|
| 734 | <dl>
|
|---|
| 735 | <dt><b>Main Author:</b></dt>
|
|---|
| 736 | <dd><a href=\"http://www.robotic.dlr.de/Martin.Otter/\">Martin Otter</a><br>
|
|---|
| 737 | Deutsches Zentrum für Luft und Raumfahrt e. V. (DLR)<br>
|
|---|
| 738 | Oberpfaffenhofen<br>
|
|---|
| 739 | Postfach 11 16<br>
|
|---|
| 740 | D-82230 Weßling<br>
|
|---|
| 741 | email: <a href=\"mailto:Martin.Otter@dlr.de\">Martin.Otter@dlr.de</a></dd>
|
|---|
| 742 | </dl>
|
|---|
| 743 |
|
|---|
| 744 |
|
|---|
| 745 | <p>
|
|---|
| 746 | Copyright © 1998-2006, Modelica Association and DLR.
|
|---|
| 747 | </p>
|
|---|
| 748 | <p>
|
|---|
| 749 | <i>The Modelica package is <b>free</b> software; it can be redistributed and/or modified
|
|---|
| 750 | under the terms of the <b>Modelica license</b>, see the license conditions
|
|---|
| 751 | and the accompanying <b>disclaimer</b>
|
|---|
| 752 | <a href=\"Modelica://Modelica.UsersGuide.ModelicaLicense\">here</a>.</i>
|
|---|
| 753 | </p><br>
|
|---|
| 754 | </html>
|
|---|
| 755 | ", revisions="<html>
|
|---|
| 756 | <ul>
|
|---|
| 757 | <li><i>Nov 8, 2004</i>
|
|---|
| 758 | by <a href=\"http://www.robotic.dlr.de/Christian.Schweiger/\">Christian Schweiger</a>:<br>
|
|---|
| 759 | Constants updated according to 2002 CODATA values.</li>
|
|---|
| 760 | <li><i>Dec 9, 1999</i>
|
|---|
| 761 | by <a href=\"http://www.robotic.dlr.de/Martin.Otter/\">Martin Otter</a>:<br>
|
|---|
| 762 | Constants updated according to 1998 CODATA values. Using names, values
|
|---|
| 763 | and description text from this source. Included magnetic and
|
|---|
| 764 | electric constant.</li>
|
|---|
| 765 | <li><i>Sep 18, 1999</i>
|
|---|
| 766 | by <a href=\"http://www.robotic.dlr.de/Martin.Otter/\">Martin Otter</a>:<br>
|
|---|
| 767 | Constants eps, inf, small introduced.</li>
|
|---|
| 768 | <li><i>Nov 15, 1997</i>
|
|---|
| 769 | by <a href=\"http://www.robotic.dlr.de/Martin.Otter/\">Martin Otter</a>:<br>
|
|---|
| 770 | Realized.</li>
|
|---|
| 771 | </ul>
|
|---|
| 772 | </html>"), Icon(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10}), graphics={Line(visible=true, points={{-34,-38},{12,-38}}, thickness=0.5),Line(visible=true, points={{-20,-38},{-24,-48},{-28,-56},{-34,-64}}, thickness=0.5),Line(visible=true, points={{-2,-38},{2,-46},{8,-56},{14,-64}}, thickness=0.5)}), Diagram(coordinateSystem(extent={{-100,100},{100,-100}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10})));
|
|---|
| 773 | end Constants;
|
|---|
| 774 |
|
|---|
| 775 | end Modelica;
|
|---|
| 776 | model ExtractorTest
|
|---|
| 777 | annotation(Diagram(coordinateSystem(extent={{-148.5,-105.0},{148.5,105.0}}, preserveAspectRatio=true, initialScale=0.1, grid={10,10})));
|
|---|
| 778 | Modelica.Blocks.Routing.Extractor extractor1(nin=2) annotation(Placement(visible=true, transformation(origin={-22.0486,7.4626}, extent={{-10.0,-10.0},{10.0,10.0}}, rotation=0)));
|
|---|
| 779 | Modelica.Blocks.Sources.IntegerStep integerStep1(startTime=5, offset=1) annotation(Placement(visible=true, transformation(origin={-50.0,-37.313}, extent={{-10.0,-10.0},{10.0,10.0}}, rotation=0)));
|
|---|
| 780 | Modelica.Blocks.Sources.Sine sine1 annotation(Placement(visible=true, transformation(origin={-90.0,37.6522}, extent={{-10.0,-10.0},{10.0,10.0}}, rotation=0)));
|
|---|
| 781 | Modelica.Blocks.Sources.Pulse pulse1 annotation(Placement(visible=true, transformation(origin={-95.8868,-0.0}, extent={{-10.0,-10.0},{10.0,10.0}}, rotation=0)));
|
|---|
| 782 | equation
|
|---|
| 783 | connect(integerStep1.y,extractor1.index) annotation(Line(visible=true, origin={-27.6991,-26.3878}, points={{-11.3009,-10.9252},{5.6505,-10.9252},{5.6505,21.8504}}));
|
|---|
| 784 | connect(sine1.y,extractor1.u[2]) annotation(Line(visible=true, origin={-47.7877,22.5574}, points={{-31.2123,15.0948},{8.7366,15.0948},{8.7366,-15.0948},{13.7391,-15.0948}}));
|
|---|
| 785 | connect(pulse1.y,extractor1.u[1]) annotation(Line(visible=true, origin={-49.2594,3.7313}, points={{-35.6274,-3.7313},{10.2083,-3.7313},{10.2083,3.7313},{15.2108,3.7313}}));
|
|---|
| 786 | end ExtractorTest;
|
|---|