Expression Training Lab
Objective
The objective of this lab is to create a model with control elements and to build familiarity with the concepts underlying control system design in Virtual.Lab Motion. This is a model in which we will use control elements to model a spring-damper system.
Lab Agenda
1. Starting up the Virtual.Lab Environment.
2. Open an existing Motion document.
3. Creating the Sensor Axis elements in the model.
4. Creating the Expression elements in the model.
5. Creating the Expression Force element in the model.
6. Solving and Postprocessing the model.
Starting the Virtual.Lab Environment
To start the Virtual.Lab environment:
Double-click on the VirtualLab Icon on your desktop.
Open an existing Motion document
From the Virtual.Lab Motion Main Menu, Select File Open gimbal.CATAnalysis from the Expression Lab folder.
Creating the Sensor Axis elements in the model.
Before creating expressions, a reference called a Sensor Axis System must first be created.
1. Click the black arrow next to the Spline Curve button
on the Mechanism Design workbench. Select the Sensor Axis System button
from the Data toolbar.
2. In the Name Field Entry enter Base SA. From the Specification Tree, Select the Product1_ROOT GlobalFixedToGroundPart (GlobalFixedToGroundPart.1) GlobalFixedToGroundPart Axis Systems Magnet Center branch. Click OK to close the Sensor Axis System definition dialog.
3. Click the Sensor Axis System button again and enter Outer Ring SA in the Name Field Entry. Select the Product1_ROOT Outer Ring (Outer Ring.1) Outer Ring Axis Systems Magnet Center from the model Specification Tree. Click OK to close the Sensor Axis System definition dialog.
Creating an Expression Element
1. Click the Expression Button
from the Data toolbar. Enter Magnetic Force Expression in the Name Field Entry. Select Force from the Parameter Type drop-down Menu. Right-Click in the Expression Field and select Formula->Edit from the resulting menu. This will bring up the Formula Editor window.
2. Enter –45E-9 in the blank field at the top of the Formula Editor window. Select Operators from the Dictionary list. Double-Click the divide symbol / from the Members of Operators List.
3. Select Motion Sensors from the Dictionary List. Double-Click on dist_mag(SA1:Sensor Axis System, SA2:Sensor Axis System):Length from the Members of Operators List.
4. To make selections for SA1 and SA2 in the configuration sensor, go back to the model Specification Tree. Double-Click the Analysis Model Sensor Axis System Outer Ring SA branch, this value will be automatically added as the SA1 value of the expression. Double-Click the Analysis Model Sensor Axis System Base SA branch, this value will be automatically added as the SA2 value of the expression.
5. To finish out the expression, Select Operators from the Dictionary list. Double-Click ** from the Members of Operators List. Then enter 2 at the end of the formula. The Formula Editor window is shown below:
Click OK to close the Formula Editor window. The resulting Warning window can be closed and ignored. Click OK to close the Expression definition dialog.
Creating an Expression Force Element.
1. Click the black arrow to the right of the Bushing button
, this will display the Forces toolbar.
2. Click the Scalar Expression Force button
, this will activate the Scalar Expression Force dialog. Set the Name Field Entry to Magnetic Force.
3. From the model Specification Tree, select the Product1_ROOT GlobalFixedToGroundPart (GlobalFixedToGroundPart.1) GlobalFixedToGroundPart Axis Systems Magnet Center branch. This axis system will appear in the Body 1 Field Entry.
4. Select the Product1_ROOT Outer Ring (Outer Ring.1) Outer Ring Axis Systems Magnet Center from the model Specification Tree. This axis system will appear in the Body 2 Field Entry.
5. Select in the Force Field Entry blank, Select the Analysis Model Data Magnetic Force Expression branch of the Specification Tree. Click OK to close the dialog.
Solving and Postprocessing the model with the Expression element.
Select and highlight the Solution Set under the AnalysisCase branch of the Specification Tree.
Now click the Compute button
to solve the model.
A Computational Progress window will appear showing the status of the solution. Click the Close Window button once the solution is complete.
Highlight the Solution Set branch under the AnalysisCase branch of the Specification Tree, Click the Animate Button
from the Mechanism Design Workbench. This will activate the Animation Toolbar. Set the animation increment using the Parameters button
. Click the Animate Button a second time to turn off the Animation Toolbar.