| 1 | within Modelica.Mechanics; |
|---|
| 2 | package Rotational |
|---|
| 3 | "Library to model 1-dimensional, rotational mechanical systems" |
|---|
| 4 | extends Modelica.Icons.Library2; |
|---|
| 5 | import SI = Modelica.SIunits; |
|---|
| 6 | |
|---|
| 7 | annotation ( |
|---|
| 8 | version="1.1.1", versionDate="2007-11-22" |
|---|
| 9 | , |
|---|
| 10 | Documentation(info="<html> |
|---|
| 11 | |
|---|
| 12 | <p> |
|---|
| 13 | Library <b>Rotational</b> is a <b>free</b> Modelica package providing |
|---|
| 14 | 1-dimensional, rotational mechanical components to model in a convenient way |
|---|
| 15 | drive trains with frictional losses. A typical, simple example is shown |
|---|
| 16 | in the next figure: |
|---|
| 17 | </p> |
|---|
| 18 | |
|---|
| 19 | <p><img src=\"../Images/Rotational/driveExample.png\"></p> |
|---|
| 20 | |
|---|
| 21 | <p> |
|---|
| 22 | For an introduction, have especially a look at: |
|---|
| 23 | </p> |
|---|
| 24 | <ul> |
|---|
| 25 | <li> <a href=\"Modelica://Modelica.Mechanics.Rotational.UsersGuide\">Rotational.UsersGuide</a> |
|---|
| 26 | discusses the most important aspects how to use this library.</li> |
|---|
| 27 | <li> <a href=\"Modelica://Modelica.Mechanics.Rotational.Examples\">Rotational.Examples</a> |
|---|
| 28 | contains examples that demonstrate the usage of this library.</li> |
|---|
| 29 | </ul> |
|---|
| 30 | |
|---|
| 31 | <p> |
|---|
| 32 | In version 3.0 of the Modelica Standard Library, the basic design of the |
|---|
| 33 | library has changed: Previously, bearing connectors could or could not be connected. |
|---|
| 34 | In 3.0, the bearing connector is renamed to \"support\" and this connector |
|---|
| 35 | is enabled via parameter \"useSupport\". If the support connector is enabled, |
|---|
| 36 | it must be connected, and if it is not enabled, it must not be connected. |
|---|
| 37 | </p> |
|---|
| 38 | |
|---|
| 39 | <p> |
|---|
| 40 | Copyright © 1998-2008, Modelica Association and DLR. |
|---|
| 41 | </p> |
|---|
| 42 | <p> |
|---|
| 43 | <i>This Modelica package is <b>free</b> software; it can be redistributed and/or modified |
|---|
| 44 | under the terms of the <b>Modelica license</b>, see the license conditions |
|---|
| 45 | and the accompanying <b>disclaimer</b> |
|---|
| 46 | <a href=\"Modelica://Modelica.UsersGuide.ModelicaLicense\">here</a>.</i> |
|---|
| 47 | </p><br> |
|---|
| 48 | </html> |
|---|
| 49 | ", revisions=""), |
|---|
| 50 | Icon(coordinateSystem(preserveAspectRatio=true, extent={{-100,-100},{100, |
|---|
| 51 | 100}}), graphics={ |
|---|
| 52 | Line(points={{-83,-66},{-63,-66}}, color={0,0,0}), |
|---|
| 53 | Line(points={{36,-68},{56,-68}}, color={0,0,0}), |
|---|
| 54 | Line(points={{-73,-66},{-73,-91}}, color={0,0,0}), |
|---|
| 55 | Line(points={{46,-68},{46,-91}}, color={0,0,0}), |
|---|
| 56 | Line(points={{-83,-29},{-63,-29}}, color={0,0,0}), |
|---|
| 57 | Line(points={{36,-32},{56,-32}}, color={0,0,0}), |
|---|
| 58 | Line(points={{-73,-9},{-73,-29}}, color={0,0,0}), |
|---|
| 59 | Line(points={{46,-12},{46,-32}}, color={0,0,0}), |
|---|
| 60 | Line(points={{-73,-91},{46,-91}}, color={0,0,0}), |
|---|
| 61 | Rectangle( |
|---|
| 62 | extent={{-47,-17},{27,-80}}, |
|---|
| 63 | lineColor={0,0,0}, |
|---|
| 64 | fillPattern=FillPattern.HorizontalCylinder, |
|---|
| 65 | fillColor={192,192,192}), |
|---|
| 66 | Rectangle( |
|---|
| 67 | extent={{-87,-41},{-47,-54}}, |
|---|
| 68 | lineColor={0,0,0}, |
|---|
| 69 | fillPattern=FillPattern.HorizontalCylinder, |
|---|
| 70 | fillColor={192,192,192}), |
|---|
| 71 | Rectangle( |
|---|
| 72 | extent={{27,-42},{66,-56}}, |
|---|
| 73 | lineColor={0,0,0}, |
|---|
| 74 | fillPattern=FillPattern.HorizontalCylinder, |
|---|
| 75 | fillColor={192,192,192})})); |
|---|
| 76 | |
|---|
| 77 | package UsersGuide "User's Guide of Rotational Library" |
|---|
| 78 | |
|---|
| 79 | annotation (__Dymola_DocumentationClass=true, Documentation(info="<HTML> |
|---|
| 80 | <p> |
|---|
| 81 | Library <b>Rotational</b> is a <b>free</b> Modelica package providing |
|---|
| 82 | 1-dimensional, rotational mechanical components to model in a convenient way |
|---|
| 83 | drive trains with frictional losses. |
|---|
| 84 | </p> |
|---|
| 85 | |
|---|
| 86 | </HTML>")); |
|---|
| 87 | |
|---|
| 88 | class Overview "Overview" |
|---|
| 89 | |
|---|
| 90 | annotation (__Dymola_DocumentationClass=true, Documentation(info="<HTML> |
|---|
| 91 | |
|---|
| 92 | <p> |
|---|
| 93 | This package contains components to model <b>1-dimensional rotational |
|---|
| 94 | mechanical</b> systems, including different types of gearboxes, |
|---|
| 95 | shafts with inertia, external torques, spring/damper elements, |
|---|
| 96 | frictional elements, backlash, elements to measure angle, angular velocity, |
|---|
| 97 | angular acceleration and the cut-torque of a flange. In sublibrary |
|---|
| 98 | <b>Examples</b> several examples are present to demonstrate the usage of |
|---|
| 99 | the elements. Just open the corresponding example model and simulate |
|---|
| 100 | the model according to the provided description. |
|---|
| 101 | </p> |
|---|
| 102 | <p> |
|---|
| 103 | A unique feature of this library is the <b>component-oriented</b> |
|---|
| 104 | modeling of <b>Coulomb friction</b> elements, such as friction in bearings, |
|---|
| 105 | clutches, brakes, and gear efficiency. Even (dynamically) coupled |
|---|
| 106 | friction elements, e.g., as in automatic gearboxes, can be handeled |
|---|
| 107 | <b>without</b> introducing stiffness which leads to fast simulations. |
|---|
| 108 | The underlying theory is new and is based on the solution of mixed |
|---|
| 109 | continuous/discrete systems of equations, i.e., equations where the |
|---|
| 110 | <b>unknowns</b> are of type <b>Real</b>, <b>Integer</b> or <b>Boolean</b>. |
|---|
| 111 | Provided appropriate numerical algorithms for the solution of such types of |
|---|
| 112 | systems are available in the simulation tool, the simulation of |
|---|
| 113 | (dynamically) coupled friction elements of this library is |
|---|
| 114 | <b>efficient</b> and <b>reliable</b>. |
|---|
| 115 | </p> |
|---|
| 116 | <p><IMG SRC=\"../Images/Rotational/drive1.png\" ALT=\"drive1\"></p> |
|---|
| 117 | <p> |
|---|
| 118 | A simple example of the usage of this library is given in the |
|---|
| 119 | figure above. This drive consists of a shaft with inertia J1=0.2 which |
|---|
| 120 | is connected via an ideal gearbox with gear ratio=5 to a second shaft |
|---|
| 121 | with inertia J2=5. The left shaft is driven via an external, |
|---|
| 122 | sinusoidal torque. |
|---|
| 123 | The <b>filled</b> and <b>non-filled grey squares</b> at the left and |
|---|
| 124 | right side of a component represent <b>mechanical flanges</b>. |
|---|
| 125 | Drawing a line between such squares means that the corresponding |
|---|
| 126 | flanges are <b>rigidly attached</b> to each other. |
|---|
| 127 | By convention in this library, the connector characterized as a |
|---|
| 128 | <b>filled</b> grey square is called <b>flange_a</b> and placed at the |
|---|
| 129 | left side of the component in the \"design view\" and the connector |
|---|
| 130 | characterized as a <b>non-filled</b> grey square is called <b>flange_b</b> |
|---|
| 131 | and placed at the right side of the component in the \"design view\". |
|---|
| 132 | The two connectors are completely <b>identical</b>, with the only |
|---|
| 133 | exception that the graphical layout is a little bit different in order |
|---|
| 134 | to distinguish them for easier access of the connector variables. |
|---|
| 135 | For example, <tt>J1.flange_a.tau</tt> is the cut-torque in the connector |
|---|
| 136 | <tt>flange_a</tt> of component <tt>J1</tt>. |
|---|
| 137 | </p> |
|---|
| 138 | <p> |
|---|
| 139 | The components of this |
|---|
| 140 | library can be <b>connected</b> together in an <b>arbitrary</b> way. E.g., it is |
|---|
| 141 | possible to connect two springs or two shafts with inertia directly |
|---|
| 142 | together, see figure below. |
|---|
| 143 | </p> |
|---|
| 144 | <p><IMG SRC=\"../Images/Rotational/driveConnections1.png\" ALT=\"driveConnections1\"></p> |
|---|
| 145 | <p><IMG SRC=\"../Images/Rotational/driveConnections2.png\" ALT=\"driveConnections2\"></p> |
|---|
| 146 | |
|---|
| 147 | </HTML>")); |
|---|
| 148 | |
|---|
| 149 | end Overview; |
|---|
| 150 | |
|---|
| 151 | class FlangeConnectors "Flange Connectors" |
|---|
| 152 | |
|---|
| 153 | annotation (__Dymola_DocumentationClass=true, Documentation(info="<HTML> |
|---|
| 154 | <p> |
|---|
| 155 | A flange is described by the connector class |
|---|
| 156 | Interfaces.<b>Flange_a</b> |
|---|
| 157 | or Interfaces.<b>Flange_b</b>. As already noted, the two connector |
|---|
| 158 | classes are completely identical. There is only a difference in the icons, |
|---|
| 159 | in order to easier identify a flange variable in a diagram. |
|---|
| 160 | Both connector classes contain the following variables: |
|---|
| 161 | </p> |
|---|
| 162 | <pre> |
|---|
| 163 | Modelica.SIunits.Angle phi \"Absolute rotation angle of flange\"; |
|---|
| 164 | <b>flow</b> Modelica.SIunits.Torque tau \"Cut-torque in the flange\"; |
|---|
| 165 | </pre> |
|---|
| 166 | <p> |
|---|
| 167 | If needed, the angular velocity <tt>w</tt> and the |
|---|
| 168 | angular acceleration <tt>a</tt> of a flange connector can be |
|---|
| 169 | determined by differentiation of the flange angle <tt>phi</tt>: |
|---|
| 170 | </p> |
|---|
| 171 | <pre> |
|---|
| 172 | w = <b>der</b>(phi); a = <b>der</b>(w); |
|---|
| 173 | </pre> |
|---|
| 174 | </HTML>")); |
|---|
| 175 | |
|---|
| 176 | end FlangeConnectors; |
|---|
| 177 | |
|---|
| 178 | class SupportTorques "Support Torques" |
|---|
| 179 | |
|---|
| 180 | annotation (__Dymola_DocumentationClass=true, Documentation(info="<HTML> |
|---|
| 181 | |
|---|
| 182 | <p>The following figure shows examples of components equipped with |
|---|
| 183 | a support flange (framed flange in the lower center), which can be used |
|---|
| 184 | to fix components on the ground or on other rotating elements or to combine |
|---|
| 185 | them with force elements. Via Boolean parameter <b>useSupport</b>, the |
|---|
| 186 | support torque is enabled or disabled. If it is enabled, it must be connected. |
|---|
| 187 | If it is disabled, it must not be connected. |
|---|
| 188 | Enabled support flanges offer, e.g., the possibility to model gearboxes mounted on |
|---|
| 189 | the ground via spring-damper-systems (cf. example |
|---|
| 190 | <a href=\"Modelica://Modelica.Mechanics.Rotational.Examples.ElasticBearing\">ElasticBearing</a>). |
|---|
| 191 | </p> |
|---|
| 192 | |
|---|
| 193 | <p><IMG SRC=\"../Images/Rotational/bearing.png\" ALT=\"bearing\"></p> |
|---|
| 194 | |
|---|
| 195 | <p> |
|---|
| 196 | Depending on the setting of <b>useSupport</b>, the icon of the corresponding |
|---|
| 197 | component is changing, to either show the support flange or a ground mounting. |
|---|
| 198 | For example, the two implementations in the following figure give |
|---|
| 199 | identical results.</p> |
|---|
| 200 | |
|---|
| 201 | <p><IMG SRC=\"../Images/Rotational/bearing2.png\" ALT=\"bearing2\"></p> |
|---|
| 202 | |
|---|
| 203 | </HTML>")); |
|---|
| 204 | |
|---|
| 205 | end SupportTorques; |
|---|
| 206 | |
|---|
| 207 | class SignConventions "Sign Conventions" |
|---|
| 208 | |
|---|
| 209 | annotation (__Dymola_DocumentationClass=true, Documentation(info="<HTML> |
|---|
| 210 | |
|---|
| 211 | <p> |
|---|
| 212 | The variables of a component of this library can be accessed in the |
|---|
| 213 | usual way. However, since most of these variables are basically elements |
|---|
| 214 | of <b>vectors</b>, i.e., have a direction, the question arises how the |
|---|
| 215 | signs of variables shall be interpreted. The basic idea is explained |
|---|
| 216 | at hand of the following figure: |
|---|
| 217 | </p> |
|---|
| 218 | <p><IMG SRC=\"../Images/Rotational/drive2.png\" ALT=\"drive2\"></p> |
|---|
| 219 | <p> |
|---|
| 220 | In the figure, three identical drive trains are shown. The only |
|---|
| 221 | difference is that the gear of the middle drive train and the |
|---|
| 222 | gear as well as the right inertia of the lower drive train |
|---|
| 223 | are horizontally flipped with regards to the upper drive train. |
|---|
| 224 | The signs of variables are now interpreted in the following way: |
|---|
| 225 | Due to the 1-dimensional nature of the model, all components are |
|---|
| 226 | basically connected together along one line (more complicated |
|---|
| 227 | cases are discussed below). First, one has to define |
|---|
| 228 | a <b>positive</b> direction of this line, called <b>axis of rotation</b>. |
|---|
| 229 | In the top part of the figure this is characterized by an arrow |
|---|
| 230 | defined as <tt>axis of rotation</tt>. The simple rule is now: |
|---|
| 231 | If a variable of a component is positive and can be interpreted as |
|---|
| 232 | the element of a vector (e.g. torque or angular velocity vector), the |
|---|
| 233 | corresponding vector is directed into the positive direction |
|---|
| 234 | of the axis of rotation. In the following figure, the right-most |
|---|
| 235 | inertias of the figure above are displayed with the positive |
|---|
| 236 | vector direction displayed according to this rule: |
|---|
| 237 | </p> |
|---|
| 238 | <p><IMG SRC=\"../Images/Rotational/drive3.png\" ALT=\"drive3\"></p> |
|---|
| 239 | <p> |
|---|
| 240 | The cut-torques <tt>J2.flange_a.tau, J4.flange_a.tau, J6.flange_b.tau</tt> |
|---|
| 241 | of the right inertias are all identical and are directed into the |
|---|
| 242 | direction of rotation if the values are positive. Similiarily, |
|---|
| 243 | the angular velocities <tt>J2.w, J4.w, J6.w</tt> of the right inertias |
|---|
| 244 | are all identical and are also directed into the |
|---|
| 245 | direction of rotation if the values are positive. Some special |
|---|
| 246 | cases are shown in the next figure: |
|---|
| 247 | </p> |
|---|
| 248 | <p><IMG SRC=\"../Images/Rotational/drive4.png\" ALT=\"drive4\"></p> |
|---|
| 249 | <p> |
|---|
| 250 | In the upper part of the figure, two variants of the connection of an |
|---|
| 251 | external torque and an inertia are shown. In both cases, a positive |
|---|
| 252 | signal input into the torque component accelerates the inertias |
|---|
| 253 | <tt>inertia1, inertia2</tt> into the positive axis of rotation, |
|---|
| 254 | i.e., the angular accelerations <tt>inertia1.a, inertia2.a</tt> |
|---|
| 255 | are positive and are directed along the \"axis of rotation\" arrow. |
|---|
| 256 | In the lower part of the figure the connection of inertias with |
|---|
| 257 | a planetary gear is shown. Note, that the three flanges of the |
|---|
| 258 | planetary gearbox are located along the axis of rotation and that |
|---|
| 259 | the axis direction determines the positive rotation along these |
|---|
| 260 | flanges. As a result, the positive rotation for <tt>inertia4, inertia6</tt> |
|---|
| 261 | is as indicated with the additional grey arrows. |
|---|
| 262 | </p> |
|---|
| 263 | </HTML>")); |
|---|
| 264 | |
|---|
| 265 | end SignConventions; |
|---|
| 266 | |
|---|
| 267 | class UserDefinedComponents "User Defined Components" |
|---|
| 268 | |
|---|
| 269 | annotation (__Dymola_DocumentationClass=true, Documentation(info="<HTML> |
|---|
| 270 | <p> |
|---|
| 271 | In this section some hints are given to define your own |
|---|
| 272 | 1-dimensional rotational components which are compatible with the |
|---|
| 273 | elements of this package. |
|---|
| 274 | It is convenient to define a new |
|---|
| 275 | component by inheritance from one of the following base classes, |
|---|
| 276 | which are defined in sublibrary Interfaces: |
|---|
| 277 | </p> |
|---|
| 278 | <table BORDER=1 CELLSPACING=0 CELLPADDING=2> |
|---|
| 279 | <tr><th>Name</th><th>Description</th></tr> |
|---|
| 280 | <tr> |
|---|
| 281 | <td valign=\"top\"><a href=\"Modelica://Modelica.Mechanics.Rotational.Interfaces.PartialRigid\">PartialRigid</a> |
|---|
| 282 | </td> |
|---|
| 283 | <td valign=\"top\">Rigid connection of two rotational 1-dim. flanges |
|---|
| 284 | (used for elements with inertia). |
|---|
| 285 | </td> |
|---|
| 286 | </tr> |
|---|
| 287 | |
|---|
| 288 | <tr> |
|---|
| 289 | <td valign=\"top\"><a href=\"Modelica://Modelica.Mechanics.Rotational.Interfaces.PartialCompliant\">PartialCompliant</a> |
|---|
| 290 | </td> |
|---|
| 291 | <td valign=\"top\">Compliant connection of two rotational 1-dim. flanges |
|---|
| 292 | (used for force laws such as a spring or a damper).</td> |
|---|
| 293 | </tr> |
|---|
| 294 | |
|---|
| 295 | <tr> |
|---|
| 296 | <td valign=\"top\"><a href=\"Modelica://Modelica.Mechanics.Rotational.Interfaces.PartialGear\">PartialGear</a> |
|---|
| 297 | </td> |
|---|
| 298 | <td valign=\"top\"> Partial model for a 1-dim. rotational gear consisting of the flange of |
|---|
| 299 | an input shaft, the flange of an output shaft and the support. |
|---|
| 300 | </td> |
|---|
| 301 | </tr> |
|---|
| 302 | |
|---|
| 303 | <tr> |
|---|
| 304 | <td valign=\"top\"><a href=\"Modelica://Modelica.Mechanics.Rotational.Interfaces.PartialTorque\">PartialTorque</a> |
|---|
| 305 | </td> |
|---|
| 306 | <td valign=\"top\"> Partial model of a torque acting at the flange (accelerates the flange). |
|---|
| 307 | </td> |
|---|
| 308 | </tr> |
|---|
| 309 | |
|---|
| 310 | <tr> |
|---|
| 311 | <td valign=\"top\"><a href=\"Modelica://Modelica.Mechanics.Rotational.Interfaces.PartialTwoFlanges\">PartialTwoFlanges</a> |
|---|
| 312 | </td> |
|---|
| 313 | <td valign=\"top\">General connection of two rotational 1-dim. flanges. |
|---|
| 314 | </td> |
|---|
| 315 | </tr> |
|---|
| 316 | |
|---|
| 317 | <tr> |
|---|
| 318 | <td valign=\"top\"><a href=\"Modelica://Modelica.Mechanics.Rotational.Interfaces.PartialAbsoluteSensor\">PartialAbsoluteSensor</a> |
|---|
| 319 | </td> |
|---|
| 320 | <td valign=\"top\">Measure absolute flange variables. |
|---|
| 321 | </td> |
|---|
| 322 | </tr> |
|---|
| 323 | |
|---|
| 324 | <tr> |
|---|
| 325 | <td valign=\"top\"><a href=\"Modelica://Modelica.Mechanics.Rotational.Interfaces.PartialRelativeSensor\">PartialRelativeSensor</a> |
|---|
| 326 | </td> |
|---|
| 327 | <td valign=\"top\">Measure relative flange variables. |
|---|
| 328 | </td> |
|---|
| 329 | </tr> |
|---|
| 330 | </table> |
|---|
| 331 | |
|---|
| 332 | <p> |
|---|
| 333 | The difference between these base classes are the auxiliary |
|---|
| 334 | variables defined in the model and the relations between |
|---|
| 335 | the flange variables already defined in the base class. |
|---|
| 336 | For example, in model <b>PartialRigid</b> the flanges flange_a and |
|---|
| 337 | flange_b are rigidly connected, i.e., flange_a.phi = flange_b.phi, |
|---|
| 338 | whereas in model <b>PartialCompliant</b> the cut-torques are the |
|---|
| 339 | same, i.e., flange_a.tau + flange_b.tau = 0. |
|---|
| 340 | </p> |
|---|
| 341 | <p> |
|---|
| 342 | The equations of a mechanical component are vector equations, i.e., |
|---|
| 343 | they need to be expressed in a common coordinate system. |
|---|
| 344 | Therefore, for a component a <b>local axis of rotation</b> has to be |
|---|
| 345 | defined. All vector quantities, such as cut-torques or angular |
|---|
| 346 | velocities have to be expressed according to this definition. |
|---|
| 347 | Examples for such a definition are given in the following figure |
|---|
| 348 | for an inertia component and a planetary gearbox: |
|---|
| 349 | </p> |
|---|
| 350 | <p><IMG SRC=\"../Images/Rotational/driveAxis.png\" ALT=\"driveAxis\"></p> |
|---|
| 351 | <p> |
|---|
| 352 | As can be seen, all vectors are directed into the direction |
|---|
| 353 | of the rotation axis. The angles in the flanges are defined |
|---|
| 354 | correspondingly. For example, the angle <tt>sun.phi</tt> in the |
|---|
| 355 | flange of the sun wheel of the planetary gearbox is positive, |
|---|
| 356 | if rotated in mathematical positive direction (= counter clock |
|---|
| 357 | wise) along the axis of rotation. |
|---|
| 358 | </p> |
|---|
| 359 | <p> |
|---|
| 360 | On first view, one may assume that the selected local |
|---|
| 361 | coordinate system has an influence on the usage of the |
|---|
| 362 | component. But this is not the case, as shown in the next figure: |
|---|
| 363 | </p> |
|---|
| 364 | <p><IMG SRC=\"../Images/Rotational/inertias.png\" ALT=\"inertias\"></p> |
|---|
| 365 | <p> |
|---|
| 366 | In the figure the <b>local</b> axes of rotation of the components |
|---|
| 367 | are shown. The connection of two inertias in the left and in the |
|---|
| 368 | right part of the figure are completely equivalent, i.e., the right |
|---|
| 369 | part is just a different drawing of the left part. This is due to the |
|---|
| 370 | fact, that by a connection, the two local coordinate systems are |
|---|
| 371 | made identical and the (automatically) generated connection equations |
|---|
| 372 | (= angles are identical, cut-torques sum-up to zero) are also |
|---|
| 373 | expressed in this common coordinate system. Therefore, even if in |
|---|
| 374 | the left figure it seems to be that the angular velocity vector of |
|---|
| 375 | <tt>J2</tt> goes from right to left, in reality it goes from |
|---|
| 376 | left to right as shown in the right part of the figure, where the |
|---|
| 377 | local coordinate systems are drawn such that they are aligned. |
|---|
| 378 | Note, that the simple rule stated in section 4 (Sign conventions) |
|---|
| 379 | also determines that |
|---|
| 380 | the angular velocity of <tt>J2</tt> in the left part of the |
|---|
| 381 | figure is directed from left to right. |
|---|
| 382 | </p> |
|---|
| 383 | <p> |
|---|
| 384 | To summarize, the local coordinate system selected for a component |
|---|
| 385 | is just necessary, in order that the equations of this component |
|---|
| 386 | are expressed correctly. The selection of the coordinate system |
|---|
| 387 | is arbitrary and has no influence on the usage of the component. |
|---|
| 388 | Especially, the actual direction of, e.g., a cut-torque is most |
|---|
| 389 | easily determined by the rule of section 4. A more strict determination |
|---|
| 390 | by aligning coordinate systems and then using the vector direction |
|---|
| 391 | of the local coordinate systems, often requires a re-drawing of the |
|---|
| 392 | diagram and is therefore less convenient to use. |
|---|
| 393 | </p> |
|---|
| 394 | </HTML>")); |
|---|
| 395 | |
|---|
| 396 | end UserDefinedComponents; |
|---|
| 397 | |
|---|
| 398 | class RequirementsForSimulationTool "Requirements for Simulation Tools" |
|---|
| 399 | |
|---|
| 400 | annotation (__Dymola_DocumentationClass=true, Documentation(info="<HTML> |
|---|
| 401 | |
|---|
| 402 | <p> |
|---|
| 403 | This library is designed in a fully object oriented way in order that |
|---|
| 404 | components can be connected together in every meaningful combination |
|---|
| 405 | (e.g. direct connection of two springs or two inertias). |
|---|
| 406 | As a consequence, most models lead to a system of |
|---|
| 407 | differential-algebraic equations of <b>index 3</b> (= constraint |
|---|
| 408 | equations have to be differentiated twice in order to arrive at |
|---|
| 409 | a state space representation) and the Modelica translator or |
|---|
| 410 | the simulator has to cope with this system representation. |
|---|
| 411 | According to our present knowledge, this requires that the |
|---|
| 412 | Modelica translator is able to symbolically differentiate equations |
|---|
| 413 | (otherwise it is e.g. not possible to provide consistent initial |
|---|
| 414 | conditions; even if consistent initial conditions are present, most |
|---|
| 415 | numerical DAE integrators can cope at most with index 2 DAEs). |
|---|
| 416 | </p> |
|---|
| 417 | </p> |
|---|
| 418 | The elements of this library can be connected together in an |
|---|
| 419 | arbitrary way. However, difficulties may occur, if the elements which can <b>lock</b> the |
|---|
| 420 | <b>relative motion</b> between two flanges are connected <b>rigidly</b> |
|---|
| 421 | together such that essentially the <b>same relative motion</b> can be locked. |
|---|
| 422 | The reason is |
|---|
| 423 | that the cut-torque in the locked phase is not uniquely defined if the |
|---|
| 424 | elements are locked at the same time instant (i.e., there does not exist a |
|---|
| 425 | unique solution) and some simulation systems may not be |
|---|
| 426 | able to handle this situation, since this leads to a singularity during |
|---|
| 427 | simulation. Currently, this type of problem can occur with the |
|---|
| 428 | Coulomb friction elements <b>BearingFriction, Clutch, Brake, LossyGear</b> when |
|---|
| 429 | the elements become stuck: |
|---|
| 430 | </p> |
|---|
| 431 | <p><IMG SRC=\"../Images/Rotational/driveConnections3.png\" ALT=\"driveConnections3\"></p> |
|---|
| 432 | <p> |
|---|
| 433 | In the figure above two typical situations are shown: In the upper part of |
|---|
| 434 | the figure, the series connection of rigidly attached BearingFriction and |
|---|
| 435 | Clutch components are shown. This does not hurt, because the BearingFriction |
|---|
| 436 | element can lock the relative motion between the element and the housing, |
|---|
| 437 | whereas the clutch element can lock the relative motion between the two |
|---|
| 438 | connected flanges. Contrary, the drive train in the lower part of the figure |
|---|
| 439 | may give rise to simulation problems, because the BearingFriction element |
|---|
| 440 | and the Brake element can lock the relative motion between a flange and |
|---|
| 441 | the housing and these flanges are rigidly connected together, i.e., |
|---|
| 442 | essentially the same relative motion can be locked. These difficulties |
|---|
| 443 | may be solved by either introducing a compliance between these flanges |
|---|
| 444 | or by combining the BearingFriction and Brake element into |
|---|
| 445 | one component and resolving the ambiguity of the frictional torque in the |
|---|
| 446 | stuck mode. A tool may handle this situation also <b>automatically</b>, |
|---|
| 447 | by picking one solution of the infinitely many, e.g., the one where |
|---|
| 448 | the difference to the value of the previous time instant is as small |
|---|
| 449 | as possible. |
|---|
| 450 | </p> |
|---|
| 451 | |
|---|
| 452 | </HTML>")); |
|---|
| 453 | |
|---|
| 454 | end RequirementsForSimulationTool; |
|---|
| 455 | |
|---|
| 456 | class Contact "Contact" |
|---|
| 457 | |
|---|
| 458 | annotation (Documentation(info="<html> |
|---|
| 459 | <dl> |
|---|
| 460 | <dt><b>Library Officer</b> |
|---|
| 461 | <dd><a href=\"http://www.robotic.dlr.de/Martin.Otter/\">Martin Otter</a> <br> |
|---|
| 462 | Deutsches Zentrum für Luft und Raumfahrt e.V. (DLR)<br> |
|---|
| 463 | Institut für Robotik und Mechatronik (DLR-RM)<br> |
|---|
| 464 | Abteilung Systemdynamik und Regelungstechnik<br> |
|---|
| 465 | Postfach 1116<br> |
|---|
| 466 | D-82230 Wessling<br> |
|---|
| 467 | Germany<br> |
|---|
| 468 | email: <A HREF=\"mailto:Martin.Otter@dlr.de\">Martin.Otter@dlr.de</A><br><br> |
|---|
| 469 | </dl> |
|---|
| 470 | |
|---|
| 471 | <p> |
|---|
| 472 | <b>Contributors to this library:</b> |
|---|
| 473 | </p> |
|---|
| 474 | |
|---|
| 475 | <ul> |
|---|
| 476 | <li> <a href=\"http://www.robotic.dlr.de/Martin.Otter/\">Martin Otter</a> (DLR-RM)</li> |
|---|
| 477 | <li> Christian Schweiger (DLR-RM, until 2006).</li> |
|---|
| 478 | <li> <a href=\"http://www.haumer.at/\">Anton Haumer</a><br> |
|---|
| 479 | Technical Consulting & Electrical Engineering<br> |
|---|
| 480 | A-3423 St.Andrae-Woerdern, Austria<br> |
|---|
| 481 | email: <a href=\"mailto:a.haumer@haumer.at\">a.haumer@haumer.at</a></li> |
|---|
| 482 | </ul> |
|---|
| 483 | |
|---|
| 484 | </html> |
|---|
| 485 | ")); |
|---|
| 486 | end Contact; |
|---|
| 487 | |
|---|
| 488 | end UsersGuide; |
|---|
| 489 | |
|---|
| 490 | package Examples "Demonstration examples of the components of this package" |
|---|
| 491 | |
|---|
| 492 | extends Modelica.Icons.Library; |
|---|
| 493 | |
|---|
| 494 | annotation ( Documentation(info="<html> |
|---|
| 495 | <p> |
|---|
| 496 | This package contains example models to demonstrate the usage of the |
|---|
| 497 | Modelica.Mechanics.Rotational package. Open the models and |
|---|
| 498 | simulate them according to the provided description in the models. |
|---|
| 499 | </p> |
|---|
| 500 | |
|---|
| 501 | </HTML> |
|---|
| 502 | ")); |
|---|
| 503 | model First "First example: simple drive train" |
|---|
| 504 | import SI = Modelica.SIunits; |
|---|
| 505 | |
|---|
| 506 | extends Modelica.Icons.Example; |
|---|
| 507 | |
|---|
| 508 | parameter Modelica.SIunits.Torque amplitude=10 |
|---|
| 509 | "Amplitude of driving torque"; |
|---|
| 510 | parameter SI.Frequency freqHz=5 "Frequency of driving torque"; |
|---|
| 511 | parameter SI.Inertia Jmotor(min=0)=0.1 "Motor inertia"; |
|---|
| 512 | parameter SI.Inertia Jload(min=0)=2 "Load inertia"; |
|---|
| 513 | parameter Real ratio=10 "Gear ratio"; |
|---|
| 514 | parameter Real damping=10 "Damping in bearing of gear"; |
|---|
| 515 | |
|---|
| 516 | annotation (Documentation(info="<html> |
|---|
| 517 | <p>The drive train consists of a motor inertia which is driven by |
|---|
| 518 | a sine-wave motor torque. Via a gearbox the rotational energy is |
|---|
| 519 | transmitted to a load inertia. Elasticity in the gearbox is modeled |
|---|
| 520 | by a spring element. A linear damper is used to model the |
|---|
| 521 | damping in the gearbox bearing.</p> |
|---|
| 522 | <p>Note, that a force component (like the damper of this example) |
|---|
| 523 | which is acting between a shaft and the housing has to be fixed |
|---|
| 524 | in the housing on one side via component Fixed.</p> |
|---|
| 525 | <p>Simulate for 1 second and plot the following variables:<br> |
|---|
| 526 | angular velocities of inertias inertia2 and 3: inertia2.w, inertia3.w</p> |
|---|
| 527 | |
|---|
| 528 | </html>"), Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-100, |
|---|
| 529 | -100},{100,100}}), |
|---|
| 530 | graphics), |
|---|
| 531 | experiment); |
|---|
| 532 | |
|---|
| 533 | Rotational.Components.Fixed fixed |
|---|
| 534 | annotation (Placement(transformation(extent={{38, |
|---|
| 535 | -48},{54,-32}}, rotation=0))); |
|---|
| 536 | Rotational.Sources.Torque torque(useSupport=true) |
|---|
| 537 | annotation (Placement(transformation(extent={{-68,-8}, |
|---|
| 538 | {-52,8}}, rotation=0))); |
|---|
| 539 | Rotational.Components.Inertia inertia1( J=Jmotor) |
|---|
| 540 | annotation (Placement(transformation(extent={{-38,-8},{-22,8}}, |
|---|
| 541 | rotation=0))); |
|---|
| 542 | Rotational.Components.IdealGear idealGear( ratio=ratio, useSupport= |
|---|
| 543 | true) |
|---|
| 544 | annotation (Placement(transformation(extent={{-8,-8},{8,8}}, rotation= |
|---|
| 545 | 0))); |
|---|
| 546 | Rotational.Components.Inertia inertia2( J=2, |
|---|
| 547 | phi(fixed=true, start=0), |
|---|
| 548 | w(fixed=true)) |
|---|
| 549 | annotation (Placement(transformation(extent={{22,-8},{38,8}}, |
|---|
| 550 | rotation=0))); |
|---|
| 551 | Rotational.Components.Spring spring( c=1.e4, |
|---|
| 552 | phi_rel(fixed=true)) annotation (Placement(transformation( |
|---|
| 553 | extent={{52,-8},{68,8}}, rotation=0))); |
|---|
| 554 | Rotational.Components.Inertia inertia3( J=Jload, w(fixed=true)) |
|---|
| 555 | annotation (Placement(transformation(extent={{82,-8},{98,8}}, |
|---|
| 556 | rotation=0))); |
|---|
| 557 | Rotational.Components.Damper damper( d=damping) |
|---|
| 558 | annotation (Placement(transformation( |
|---|
| 559 | origin={46,-22}, |
|---|
| 560 | extent={{-8,-8},{8,8}}, |
|---|
| 561 | rotation=270))); |
|---|
| 562 | Modelica.Blocks.Sources.Sine sine(amplitude=amplitude, freqHz=freqHz) |
|---|
| 563 | annotation (Placement(transformation(extent={{-98,-8},{-82,8}}, |
|---|
| 564 | rotation=0))); |
|---|
| 565 | equation |
|---|
| 566 | connect(inertia1.flange_b, idealGear.flange_a) |
|---|
| 567 | annotation (Line(points={{-22,0},{-8,0}}, color={0,0,0})); |
|---|
| 568 | connect(idealGear.flange_b, inertia2.flange_a) |
|---|
| 569 | annotation (Line(points={{8,0},{22,0}}, color={0,0,0})); |
|---|
| 570 | connect(inertia2.flange_b, spring.flange_a) |
|---|
| 571 | annotation (Line(points={{38,0},{52,0}}, color={0,0,0})); |
|---|
| 572 | connect(spring.flange_b, inertia3.flange_a) |
|---|
| 573 | annotation (Line(points={{68,0},{82,0}}, color={0,0,0})); |
|---|
| 574 | connect(damper.flange_a, inertia2.flange_b) |
|---|
| 575 | annotation (Line(points={{46,-14},{46,0},{38,0}}, color={0,0,0})); |
|---|
| 576 | connect(damper.flange_b, fixed.flange) |
|---|
| 577 | annotation (Line(points={{46,-30},{46,-40}}, color={0,0,0})); |
|---|
| 578 | connect(sine.y, torque.tau) annotation (Line(points={{-81.2,0},{-69.6,0}}, |
|---|
| 579 | color={0,0,127})); |
|---|
| 580 | connect(torque.support, fixed.flange) annotation (Line(points={{-60,-8}, |
|---|
| 581 | {-60,-40},{46,-40}}, color={0,0,0})); |
|---|
| 582 | connect(idealGear.support, fixed.flange) annotation (Line(points={{0,-8},{ |
|---|
| 583 | 0,-40},{46,-40}}, color={0,0,0})); |
|---|
| 584 | connect(torque.flange, inertia1.flange_a) annotation (Line( |
|---|
| 585 | points={{-52,0},{-38,0}}, |
|---|
| 586 | color={0,0,0}, |
|---|
| 587 | smooth=Smooth.None)); |
|---|
| 588 | end First; |
|---|
| 589 | |
|---|
| 590 | model FirstGrounded |
|---|
| 591 | "First example: simple drive train with grounded elments" |
|---|
| 592 | import SI = Modelica.SIunits; |
|---|
| 593 | |
|---|
| 594 | extends Modelica.Icons.Example; |
|---|
| 595 | |
|---|
| 596 | parameter Modelica.SIunits.Torque amplitude=10 |
|---|
| 597 | "Amplitude of driving torque"; |
|---|
| 598 | parameter SI.Frequency freqHz=5 "Frequency of driving torque"; |
|---|
| 599 | parameter SI.Inertia Jmotor(min=0)=0.1 "Motor inertia"; |
|---|
| 600 | parameter SI.Inertia Jload(min=0)=2 "Load inertia"; |
|---|
| 601 | parameter Real ratio=10 "Gear ratio"; |
|---|
| 602 | parameter Real damping=10 "Damping in bearing of gear"; |
|---|
| 603 | |
|---|
| 604 | annotation (Documentation(info="<html> |
|---|
| 605 | <p>The drive train consists of a motor inertia which is driven by |
|---|
| 606 | a sine-wave motor torque. Via a gearbox the rotational energy is |
|---|
| 607 | transmitted to a load inertia. Elasticity in the gearbox is modeled |
|---|
| 608 | by a spring element. A linear damper is used to model the |
|---|
| 609 | damping in the gearbox bearing.</p> |
|---|
| 610 | <p>Note, that a force component (like the damper of this example) |
|---|
| 611 | which is acting between a shaft and the housing has to be fixed |
|---|
| 612 | in the housing on one side via component Fixed.</p> |
|---|
| 613 | <p>Simulate for 1 second and plot the following variables:<br> |
|---|
| 614 | angular velocities of inertias inertia2 and 3: inertia2.w, inertia3.w</p> |
|---|
| 615 | |
|---|
| 616 | </HTML>"), Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-100, |
|---|
| 617 | -100},{100,100}}), |
|---|
| 618 | graphics), |
|---|
| 619 | experiment(StopTime=1)); |
|---|
| 620 | |
|---|
| 621 | Rotational.Components.Fixed fixed |
|---|
| 622 | annotation (Placement(transformation(extent={{38,-48}, |
|---|
| 623 | {54,-32}}, rotation=0))); |
|---|
| 624 | Rotational.Sources.Torque torque(useSupport=false) |
|---|
| 625 | annotation (Placement(transformation(extent={{-68,-8}, |
|---|
| 626 | {-52,8}}, rotation=0))); |
|---|
| 627 | Rotational.Components.Inertia inertia1( J=Jmotor) |
|---|
| 628 | annotation (Placement(transformation(extent={{-38,-8},{-22,8}}, |
|---|
| 629 | rotation=0))); |
|---|
| 630 | Rotational.Components.IdealGear idealGear(ratio=ratio, useSupport=false) |
|---|
| 631 | annotation (Placement(transformation(extent={{-8,-8},{8,8}}, rotation= |
|---|
| 632 | 0))); |
|---|
| 633 | Rotational.Components.Inertia inertia2( J=2, |
|---|
| 634 | phi(fixed=true, start=0), |
|---|
| 635 | w(fixed=true)) |
|---|
| 636 | annotation (Placement(transformation(extent={{22,-8},{38,8}}, |
|---|
| 637 | rotation=0))); |
|---|
| 638 | Rotational.Components.Spring spring( c=1.e4, |
|---|
| 639 | phi_rel(fixed=true)) annotation (Placement(transformation( |
|---|
| 640 | extent={{52,-8},{68,8}}, rotation=0))); |
|---|
| 641 | Rotational.Components.Inertia inertia3( J=Jload, w(fixed=true)) |
|---|
| 642 | annotation (Placement(transformation(extent={{82,-8},{98,8}}, |
|---|
| 643 | rotation=0))); |
|---|
| 644 | Rotational.Components.Damper damper( d=damping) |
|---|
| 645 | annotation (Placement(transformation( |
|---|
| 646 | origin={46,-22}, |
|---|
| 647 | extent={{-8,-8},{8,8}}, |
|---|
| 648 | rotation=270))); |
|---|
| 649 | Modelica.Blocks.Sources.Sine sine(amplitude=amplitude, freqHz=freqHz) |
|---|
| 650 | annotation (Placement(transformation(extent={{-98,-8},{-82,8}}, |
|---|
| 651 | rotation=0))); |
|---|
| 652 | equation |
|---|
| 653 | connect(inertia1.flange_b, idealGear.flange_a) |
|---|
| 654 | annotation (Line(points={{-22,0},{-8,0}}, color={0,0,0})); |
|---|
| 655 | connect(idealGear.flange_b, inertia2.flange_a) |
|---|
| 656 | annotation (Line(points={{8,0},{22,0}}, color={0,0,0})); |
|---|
| 657 | connect(inertia2.flange_b, spring.flange_a) |
|---|
| 658 | annotation (Line(points={{38,0},{52,0}}, color={0,0,0})); |
|---|
| 659 | connect(spring.flange_b, inertia3.flange_a) |
|---|
| 660 | annotation (Line(points={{68,0},{82,0}}, color={0,0,0})); |
|---|
| 661 | connect(damper.flange_a, inertia2.flange_b) |
|---|
| 662 | annotation (Line(points={{46,-14},{46,0},{38,0}}, color={0,0,0})); |
|---|
| 663 | connect(damper.flange_b, fixed.flange) |
|---|
| 664 | annotation (Line(points={{46,-30},{46,-40}}, color={0,0,0})); |
|---|
| 665 | connect(sine.y, torque.tau) annotation (Line(points={{-81.2,0},{-69.6,0}}, |
|---|
| 666 | color={0,0,127})); |
|---|
| 667 | connect(torque.flange, inertia1.flange_a) annotation (Line( |
|---|
| 668 | points={{-52,0},{-38,0}}, |
|---|
| 669 | color={0,0,0}, |
|---|
| 670 | smooth=Smooth.None)); |
|---|
| 671 | end FirstGrounded; |
|---|
| 672 | |
|---|
|
|---|