1.
Simulation of Mechanisms-
Analytical and Web-based
Virtual Prototyping: A
Comparative Study
Under the Supervision of Dr. Krovi
Sasi Bhushan Beera
1
2.
Simulation of Mechanisms: Analytical and Web-based Virtual
Prototyping- A Comparative Study
by
Sasi Bhushan Beera
Under the guidance of
Dr. Krovi
2
3.
Contents
Introduction ………………………………………………………………………..3
Objective …………………………………………………………………………...3
Case Study 1: Simple Pendulum ……………..……………………………………5
Case Study 2: Double Pendulum ……………..…………………………………..19
Case Study 3: Four Bar Mechanism ……………..…………………………….....41
Case Study 4: Wheeled Mobile Robot ……………..…………………………….47
Symbolic Modeling using MapleSim……………………………………………..55
Conclusion………………………………………………………………………...67
References………………………………………………………………………...68
3
4.
Introduction
In the recent years there has been tremendous advancement in computer technology. The
engineering domain had benefited significantly with the application of computational power in
many fields like design, development, manufacturing and analysis etc. In the case of mechanisms
Mathematical/Analytical models are generally used to represent simple models. Such models can
be analyzed by developing the equations of motion and solving them analytically. These models
can be used as a starting step in the analysis process. However, modeling complex geometries
analytically is always a herculean task.
With the advent of modeling techniques like Virtual Prototyping (VP) modeling and
analysis of complex geometries becomes much easier and saves a lot of time. Computer based
simulation tools can now be used to model mechanisms and calculate their kinematic and
dynamic responses which can be visualized in a 3-D virtual environment. Some of the
advantages of these techniques are (a) Simplicity in Modeling (b) Ability to accelerate the
process. However, it must be always kept in mind that these tools work on the principle
“Garbage in, garbage out”.
Objective
The main objective of this study is to compare the various simulation tools from the view point
of:
1) Simplicity in Modeling
2) Accuracy of Modeling
As discussed in the previous section equations of motion for simple mechanisms are
developed and solved analytically. And then for the same mechanisms simulation tools are used
for modeling and analysis. The results are then compared.
Analytical Approach
Idealize by making assumptions
Drawing Free Body Diagrams
Formulating EOM‟s
Solving for them
Simulation Based Design
With the development of computational technology, a number of simulation tools have been
developed for modeling complex mechanical systems. Some of the tools which we will use to
accomplish the objective of our study are listed below:
4
5.
1) VisualNastran
2) SimMechanics
3) MapleSim
Implementation
CREATE THE MODEL IN SOLIDWORKS
EXPORT THE MODEL TO EXPORT THE MODEL TO SIMMECHANICS
VISUALNASTRAN
SIMULATE AND VISUALIZE THE MOTION
PLOT AND ANALYZE THE RESULTS
The various examples considered are:
1) Simple Pendulum
2) Two Link
3) Four Bar
4) Wheeled Mobile Robot
5
6.
Case Study 1: Simple Pendulum
Analytical Approach
FIGURE 1: Simple Pendulum
Mass of the Link m = 2Kg
Length of the Link l = 2m
TABLE 1
Lagrangian Formulation
Step1: Introduce generalized coordinates and generalized speeds
= , =
Step2: Define Kinetic Energy (T)
1 1
= 2 + 2
2 2
Step3: Define Potential Energy (V)
6
7.
cos
= −
2
Step4: Power (π)
= = 0
Step5: Dissipation (∆)
1
∆= 2
2
Step6: Lagrangian (L)
= −
Step7: Equation of Motion (EOM)
∆
: − = −
Substituting the above defined terms in EOM we get the generalized equation of motion as:
1 2 1
+ sin = 0
3 2
Task:
To give an initial joint angle of 30 deg and simulate its motion.s
Virtual Simulation
We use SolidWorks to model the simple pendulum and then export it to either VisualNastran or
SimMechanics to simulate its motion. The basic steps of modeling and simulation are shown in
the flow diagram below:
1. Creating the model in SolidWorks:
Create the model of the simple pendulum in SolidWorks which basically consists of two
parts, the pin and the link. The pin is the fixed part and the link is the part that rotates like
a pendulum and both of them are connected by a revolute joint. The model is shown
below:
7
8.
FIGURE 2: Isometric view of the link and the pin
The length of the link (pendulum) is set to 1 meter and the breadth as 0.1 meter. The dimensions
of the above assembly can be seen in the figure above.
2. Exporting the model to VisualNastran and simulating its motion:
The following steps are carried out in this process:
Exporting the model
Simulating its motion
Plot and analyzing the results
Exporting the model to VisualNastran:
To activate MSC.VisualNastran desktop for SolidWorks, We need to enable it using the
SolidWorks Add-Ins feature.
Launch the SolidWorks program
Choose Add-Ins in SolidWorks tools menu
Check the VisualNastran checkbox
8
9.
1. VisualNastran Menu appears in SolidWorks. Launch VisualNastran by clicking the
connect button in the VisualNastran menu.
FIGURE 3: VisualNastran menu in SolidWorks
When the export is complete, the MSC.VisualNastran Desktop program opens and displays the
CAD Associativity dialog, listing the MSC.visualNastran Desktop objects that are associated
with the objects in the SolidWorks model as shown below:
FIGURE 4: CAD Associativity Dialog
2. Click OK to close the CAD Associativity dialog.
MSC.VisualNastran Desktop prompts you to run the constraint Navigator.
3. Click Yes to run the Constraint Navigator.
The Constraint Navigator allows you to examine the relationships among bodies,
subassemblies, and constraints so that you can verify and modify your simulation model.
9
10.
FIGURE 5: Constraint Navigator
In the steps to follow, you will adjust the joints to give each the appropriate degrees of
freedom.
1. Click the next constraint button.
Concentric1, a revolute constraint, is isolated as shown in figure below:
10
11.
FIGURE 6: Isolated Constraint
2. Click the Move button in the Constraint Navigator, click over the pendulum, and drag
the mouse.
This tests the kind of movement allowed by the constraint. This constraint is OK.
3. Similarly check other constraints. In our case we have only one revolute constraint.
4. Click Done to close the Constraint Navigator.
Anchoring Assembly:
If a body is “fixed” in SolidWorks, it will be anchored in MSC.VisualNastran Desktop. And by
default, SolidWorks “fixes” the first body brought into an assembly. In our model the pin is fixed
and the link can rotate about the pin which is exactly what we want.
Simulating the Motion:
11
12.
The first step in simulating the motion of the piston assembly is to make sure it is properly
anchored.
When VisualNastran imports the body from SolidWorks, it anchors it appropriately. No
modifications are necessary. You are ready to run an initial simulation.
1. Click the Run button in the Tape Player Control, and let the simulation run.
VisualNastran begins to simulate the motion of the model. The geometry of the assembly causes
the link to swing like a pendulum around the pin.
Since this is the first time the simulation is being run, VisualNastran calculates the dynamics and
stores the data.
2. Repeat the simulation by clicking the Stop button, then the Reset button, and then the
Run button again.
Depending on the speed of the computer, the animation may be faster this time because the
history has already been calculated.
Adding a Motor:
Currently, the assembly is moving only in response to the effects of gravity. In this step, you will
change the joint between the pin and the link to a motor that drives the motion of the system.
1. Right click on concentric1 and select properties.
2. Then select Revolute Motor from the list of available joint types as shown below.
The revolute joint is changed to revolute motor.
FIGURE 7: Properties Window for Revolute Motor
12
13.
3. Click the Motor tab.
This displays the motor page of the properties window.
4. You can select either of the four: Orientation, Angular velocity, Angular Acceleration
and Torque. Enter a value and simulate the pendulum.
Results:
The position, velocity, acceleration of the link and constraint torques and joint forces can be
computed at each point in time as simulation takes place.
1. Select Meter from the Insert button. And from Meter you can select orientation,
velocity, acceleration, torque or joint forces to be mapped as we run the simulation.
FIGURE 8: Results shown at the bottom of the window
Now, we would want to compare the results obtained by VisualNastran with analytical results.
13
14.
We simulate the pendulum under gravity setting the initial angle to be pi/3. And meter the
angular orientation, velocity and acceleration as described above.
For simplicity, find the joint angles, rates and accelerations at three different times and compare
them with the analytical results which can be obtained by the EOM of the Simple Pendulum
given above.
The results are tabulated as shown below:
Analytical VisualNastran Error
θ θ
-23.1 -330.445 -351 0.062203998
10.9 159.265 169 0.061124541
3.81 55.966 59.4 0.061358682
TABLE 2
3. Exporting to SimMechanics :
The following steps are carried out in this process:
Exporting the model
Simulating its motion
Plotting and analyzing the results
Exporting the model to SimMechanics:
Launch the SolidWorks program
Choose Add-Ins in SolidWorks tools menu
Check the SimMechanics checkbox.
1. SimMechanics menu appears in SolidWorks. Click settings from the menu and leave
the settings default. Then save the file as .xml
2. Open Matlab and go to the folder that has the .xml file
3. Then type the command “import_physmod(„filename.xml‟). It takes the xml file and
converts the SolidWorks model into a Simulink block diagram.
14
15.
4. We get an icon which indicates that we imported the model from SolidWorks.
FIGURE 9: Icon of SolidWorks model in Simulink
5. Double click the icon to get the whole mechanism represented in terms of Simulink
block diagram.
FIGURE 10: Simulink Block Diagram
6. Enable the inherent virtual environment window in SimMechanics. Go to
Simulation, Configuration parameters and select SimMechanics and check the
two dialog boxes as shown in the figure below.
15
16.
FIGURE 11: Configuring Parameters in SimMechanics
7. Then select Update Diagram from Edit menu, which shows the mechanism in its
own virtual environment. It may not be very clear like SolidWorks since it takes mass
properties of the elements into account.
16
17.
FIGURE 12: Simple Pendulum in SimMechanics Virtual Environment
8. The gravity settings and Analysis mode (Forward Dynamics, Inverse Dynamics etc)
can be selected by clicking the Environment Block.
9. The time settings can be selected by clicking Configuration Parameters, Solver and
entering the values for time settings.
Case1: Simulation under gravity
Case2: Simulation with a motor
1. We can actuate the revolute joint by clicking the revolute joint icon in the Simulink
Block diagram and enter the number of sensor and actuator ports.
2. The sensor and actuator ports can be connected to a sensor and actuator block
respectively by which we can actuate the joint and measure the various parameters.
3. We can actuate the joint either by torque or by motion. Lets actuate it with motion and
give a sinusoidal input.
17
18.
4. And we can monitor the output by connecting the joint sensor to a scope.
The final Simulink Block diagram looks like
FIGURE 13: Final Simulink Block Diagram
Results:
The simple pendulum is simulated under gravity and with the motor actuated by a sinusoidal
input.
And we could monitor the angular units, angular velocity, angular acceleration, reaction torque
and reaction force at each instant in time.
18
19.
FIGURE 14: Angular units, Velocity and Acceleration of the Pendulum
Similarly we can simulate the reaction forces and torques on the pendulum.
Comparison:
Analytical SimMechanics
θ θ Error
23.76 -339.347 -356.758 0.051307364
17.44 -252.427 -264.723 0.048711113
-3.96 58.165 63.506 0.091824981
-27.57 389.819 413.717 0.061305375
TABLE 3
19
20.
Case Study 2: Two Link Mechanism
Analytical Approach
FIGURE 15: Two Link Mechanism
Link Lengths 1 = 2, 2 = 1
Distance of Mass Centers
= , = 1,2
2
Link Masses and Inertias 1 = 10, 2 = 6, 1 = 3, 2 = 2
TABLE 4
Lagrangian Formulation
We follow the seven step procedure demonstrated for the case of Simple Pendulum to
find the equations of motion for the two link mechanism.
Step1: Introduce generalized coordinates and generalized speeds
20
21.
1
= , = 1
2 2
Step2: Define Kinetic Energy (T)
1 1
= 2 + 2 2 , = 1,2
2 2
= 1 + 2
We get Kinetic energy as,
1 1 1 1 1
= 1 2 + 1 + 2 2 1 + 2 2 + 2 2
1 1
2
2
2
2 2 2 2 2
+ 22 1 2 1 2 cos 2 − 1
Step3: Define Potential Energy (V)
= 1 + 2
We get Potential Energy as,
= (1 + 2 )1 + 1 1 + 2 1 sin 1 + 2 2 sin 2
Step4: Power (π)
= 1 1 + 2 (2 − 1 )
Step5: Dissipation (∆)
1 2
1 2 2
∆= 1 1 + 2 (2 − 1 )
2 2
Step6: Lagrangian (L)
= −
Step7: Equation of Motion (EOM)
∆
: − = −
Substituting the above defined terms in we get the generalized equation of motion as
+ , + =
21
22.
1 1
= , =
2 2
2
1 2
2
1 + 1 2 1 2 1 cos(2 − 1 )
= 4 2
2 2
2 1 cos(2 − 1 ) 2 + 2 2 /4
2
l2 2
−m2 l1
sin θ2 − θ1 2
2
=
l2 2
−m2 l1 sin θ2 − θ1 1
2
1
1 cos θ1 + 2 1 cos 1
= 2
2
2 cos 2
2
Task: To trace an ellipse
Task To trace an ellipse
Center = 0, = 0
Semi major and Minor Axes 1 = 1.75, 2 = 1.25
Ellipse Orientation = /4
Angular Velocity = 72/180
TABLE 5
Controls Used:
Kinematics Closed loop Task Space Control
Dynamics Closed loop Joint Space Control
22
23.
Virtual Simulation
Step 1: Creating the model in SolidWorks
FIGURE 16: Front View of a Two Link Mechanism in SolidWorks
Step2: Exporting the Two link mechanism to VisualNastran
The two link mechanism developed in SolidWorks is then exported to VisualNastran to
simulate its motion.
23
24.
FIGURE 17: Isometric View of the Two Link Mechanism in VisualNastran
The motion of the two link mechanism is simulated under gravity and by actuating its
joints. The joints can be actuated by a revolute motor and velocity, acceleration and
torque profiles can be given as inputs to simulate the motion.
Step3: From SolidWorks Assemblies to Simmechanics Models and Virtual Reality
Toolbox Animations
The two link mechanism is then exported to SimMechanics. Now let us have our end
effector trace the trajectory of a circle. The joint angles, rates and accelerations are
computed analytically and they are given as inputs to the respective joints to obtain the
required task space motion.
24
25.
FIGURE 18: SolidWorks Model
FIGURE 19: Simulink Model with Virtual Reality Toolbox Animation
To convert the SolidWorks assembly into a SimMechanics model
To create an animation of the model:
-Export the SolidWorks assembly into a virtual world and link it to the SImMechanics
model using Virtual Reality Toolbox
Process1: Convert the SolidWorks Assembly into a SimMechanics model
Save the SolidWorks assembly into an XML file
Create a SimMechanics model
25
26.
FIGURE 20: Creating an XML File
FIGURE 21: Importing to SimMechanics
26
27.
FIGURE 22: Icon of SolidWorks model in Simulink
FIGURE 23: SimMechanics Model
Go to Simulation Configuration parameters SImMechanics Show Animation and
Simulation
27
28.
FIGURE 24: Configuring Parameters in SimMechanics
FIGURE 25: Animation Window
Not a very realistic animation. We want to connect Virtual Reality Toolbox to get a
realistic animation.
Process2: Export the SolidWorks Assembly as a VRML file
28
29.
Set the level of detail in SolidWorks
1. VRML 97 output format
2. Separate files
3. Units-meters
Set the Export Options
Export
FIGURE 26: Setting image quality
29
30.
FIGURE 27: Save as VRML
FIGURE 28: Settings to be used while saving
30
31.
Process3: Prepare the virtual scene
Correct the VRML export filter shortcoming
Create an aggregated main file
Add Transform nodes
Add
- World information
- Navigation information
- Lighting
- Top-level Transform node
- View points
FIGURE 29: Open the VRML file as text file
31
32.
FIGURE 30: Notice the ShortComing
FIGURE 31: Correct the Shortcoming and save
32
33.
To add transform nodes and do other settings open the VRMl file with VREALM builder
FIGURE 32: VREALM BUILDER
Process4: Create Signals to connect to a virtual scene
For each body, add a unity coordinate system
Add Body Sensor blocks:
- Measure position and rotation matrix
- Set units to meters
Add Goto and From blocks for keeping the model clean
FIGURE 33: Creating Unity coordinate system
33
34.
FIGURE 34: Adding Body Sensor Blocks
FIGURE 35: Add GOTO blocks
Process5: Add a Virtual Scene to the model
Add the VR Sink block to the model
For each body in the virtual scene, select translation and rotation
Use Rotation Matrix to the VRML Rotation block
34
35.
FIGURE 36: Creating a subsystem
FIGURE 37: Add FROM block and VR Sink block to subsystem
35
36.
FIGURE 38: Appropriate settings by double-clicking VR Sink block
FIGURE 39: Add the appropriate tags to the FROM blocks
36
37.
FIGURE 40: Use Rotation matrix to VR
FIGURE 41: Virtual Model
37
38.
Customizing our model to perform the required task:
The task here is to trace an ellipse. So we need to actuate the revolute joints accordingly.
For this case let us do kinematic actuation. We will explore dynamic actuation in our next
example, Four-bar mechanism. Kinematic actuation implies we simply actuate the
motors at both the revolute joints using motion (joint angles, rates and acceleration).
From inverse kinematic analysis we can come up with equations for joint rates and pass
them through integrator and differentiator blocks to find joint angles and joint
accelerations respectively. The final model in Simulink is as shown below.
FIGURE 42: Simulink block diagram of final model
38
39.
FIGURE 43: SubSystem of the Simulink model
Clicking the simulation, we could see that the two-link manipulator traces the desired
trajectory.
Comparison with Analytical Solution:
However, our goal here is to compare the SimMechanics solution with the analytical
solution that we have from Matlab. The criteria of comparison here is the error in joint
angles. Error is equal to desired joint angles minus the actual joint angles. The results are
shown in the figures below.
39
40.
FIGURE 44: Error in joint angle one in SimMechanics
FIGURE 45: Error in joint angle 2 using SimMechanics
40
41.
FIGURE 46: Error in joint angle one using Analytical method
FIGURE 47: Error in joint angle 2 using Analytical method
41
42.
Analytical SimMechanics
10 13
10 12.5
TABLE 5: Maximum errors in joint angles
Comparing the above to graphs, we could clearly see that the errors are less in Analytical
method as compared to SimMechanics. However, the difference is not so much. So
taking into account the ease of modeling and animation into criteria we could clearly
deploy SimMechanics for Virtual Prototyping.
42
43.
Case Study 3: Four Bar Mechanism
Analytical Approach
FIGURE 48: Four Bar Mechanism
Link Lengths 0 = 1, 1 = 1, 2 = 4, 3 = 1.5
TABLE 6
Kinematic Analysis
Loop Closure Equations
1 1 + 2 2 = 0 + 3 3
1 1 + 2 2 = 3 3
We can differentiate the above two equations with respect to time to come up with
velocity level equations:
−1 sin 1 1 − 2 sin 2 2 = −3 sin 3 3
1 cos 1 1 + 2 cos 2 2 = 3 cos 3 3
Given the angular velocity of crank: 1 = w2 = p/6 rad/s, we can compute the angular
velocities of the other two links by solving the above two equations:
θ2 = (−1 sin 1 + 1 1 tan 3 1 )/( −1 cos 2 tan 3 + 2 sin 2 )
43
44.
3 = (l1 sin θ1 θ1 + l2 sin θ2 θ2 )/(l3 3 )
Let us drive this model by giving a constant velocity to the crank.
Virtual Simulation
Step 1: Four Bar Mechanism in SolidWorks
FIGURE 49: Isometric View of Four Bar in SolidWorks
Step2: Exporting the Four Bar to VisualNastran
The Four Bar mechanism can be exported to VisualNastran just like in the case of Simple
Pendulum. The model looks as shown in the figure below in the VisualNastran environment.
44
45.
FIGURE 50: Four Bar Mechanism in VisualNastran Environment
Step3: Exporting the Four Bar to SimMechanics:
The Four Bar mechanism is then exported to SimMechanics and here we can actuate the revolute
joints with the required inputs. And we also connect it to Virtual world for much better
animation.
45
46.
FIGURE 51: SimMechanics Model
FIGURE 52: Final SimMechanics Model with Virtual Reality Animation
46
48.
Case Study 4: Wheeled Mobile Robot
Dynamic Analysis
Consider the Wheeled Mobile Robot as shown in the figure below:
The following notation will be used in the rest of our discussion:
− :
− : the coordinate system fixed to the cart
: ,
: ,
: ( , )
FIGURE 53: Wheeled Mobile Robot
Where,
48
49.
:
:
:
DC motors
:
:
:
:
:
: −
If we ignore the passive wheels, the configuration of the platform can be
described by five generalized coordinates. These are the three variables that describe the
position and orientation of the platform and two variables that specify the angular
positions for the driving wheels. Therefore, let
= xc , yc , ∅, θr , θl
Where ( , ) are the coordinates of center of mass in the world coordinate system
and ∅ is the heading angle of the platform as shown in FIGURE 50, θr and θl are the
angular positions of right and left driving wheels respectively.
Assuming the driving wheels roll (and do not slip) there are three constraints.
cos ∅ − sin ∅ − ∅ = 0
cos ∅ + sin ∅ + ∅ =
cos ∅ + sin ∅ − ∅ =
The three constraints can be written in the form:
= 0
49
50.
FIGURE 54: Notation for the geometry of the mobile platform
Where
− sin ∅ cos ∅ − 0 0
− cos ∅ sin ∅ − 0
− cos ∅ − sin ∅ 0
Thus the mechanical system has two degrees of freedom.
It is straightforward to verify that the following matrix
c(b cos ∅ − d sin ∅) c(b cos ∅ + d sin ∅)
c(b sin ∅ + d cos ∅) c(b sin ∅ − d cos ∅)
S q = c −c
1 0
0 1
Which satisfies () = 0, where the constant = /2.
We now derive the dynamic equation for the mobile platform. The lagrange equations of
motion of the platform are given by
50
51.
+ , + =
Where,
0 2 sin ∅ 0 0
0 −2 cos ∅ 0 0
= 2 sin ∅ −2 cos ∅ 0 0
0 0 0 0
0 0 0 0
2 ∅2 cos ∅ 0 0
2 ∅2 sin ∅ 0 0
, = 0 = 0 0 =
0 1 0
0 0 1
1 θ
= = l
2 θr
The task here is such that the look ahead point should trace a given trajectory.
Now is given by the following relation:
L1
= T
L2
Where
cos ∅ − sin ∅ xc
= sin ∅ cos ∅ yc
0 0 1
Since the system has two inputs, we may choose any two output signals, we may
choose any two output variables. We consider the following four types of output equations:
Type I: = = ,
Type II: = = , ∅
Type III: = = , ∅
Type IV: = = 1 , 2 ()
The Type I output equation results in a trajectory tracking control system which has been
studied.
51
52.
The Corresponding decoupling matrix for the output is:
∅11 ∅12
Ф=
∅21 ∅22
∅11 =c b − L2 cos ∅ − (d + L1 ) sin ∅
∅12 =c b + L2 cos ∅ + (d + L1 ) sin ∅
∅21 =c b − L2 sin ∅ + (d + L1 ) cos ∅
∅22 =c b + L2 sin ∅ − (d + L1 ) cos ∅
Ф Ф
∅ = ∅= (1 − 2 )
∅ ∅
= ( ) + +
u = ∅−1 q − ∅
1 = 1
2 = 2
Simulink Integration
The above dynamic formulation is used to prepare a Simulink block diagram and connect it to
VR toolbox and simulate the motion of a WMR.
The block diagram is as shown In the figure below:
52
53.
FIGURE 55: Simulink Model of WMR
Results:
The look ahead point should trace an ellipse of given parameters. The motion of the WMR is
simulated and the generalized coordinates and velocities are plotted as shown below:
FIGURE 56: X and Y Coordinates of the Look ahead point
53
54.
FIGURE 57: and vs time
FIGURE 58: and vs time
54
56.
Symbolic Modeling using MapleSim
MapleSim is a complete environment for modeling and simulating complex multidomain
physical systems. It allows building component diagrams that represent physical systems in a
graphical form. Using both symbolic and numeric approaches, MapleSim automatically
generates model equations from a component diagram and runs high-fidelity simulations.
We can generate the model equations and then use them for post processing in the Maple
environment without having to worry about deriving them.
Implementation
Create the Model in MapleSim
Obtain the multibody equations using the multibody equations template
Copy the equations in a new document folder
Solve the ODE‟s
Post process
Case Study 1: Simple Pendulum
Mass of the Link m = 2Kg
Length of the Link l = 2m
TABLE 8
Creating MapleSim Model
56
57.
FIGURE 60: MapleSim Model of Simple Pendulum
Obtaining the multibody equations and solving them
The multibody equations of the above model are obtained from the multibody equations template
and they are copied into a new Maple document and solved. Below attached in the Maple
document showing the same:
Mass Matrix (M)
Equations of Motion (EOM)
57
59.
FIGURE 62: Animation of the Pendulum
Initial Condition:
= pi/4 from vertical
59
60.
Results
Simulating the system for 10 secs in Matlab and in MapleSim gives us the following results:
FIGURE 63: X-Y position of the end effector in Matlab and in MapleSim
FIGURE 64: in Matlab and in MapleSim
60
62.
Case Study 2: Two Link Mechanism
To simulate the motion of a double pendulum under gravity in Matlab and MapleSIm and
compare the results.
Link Lengths L1 = 2, L2 = 1
Distance of Mass centers Lci = Li/2, i = 1,2
Link Masses and Inertias M1 = 2, M2 =1 , Ji = Mili^2/3
TABLE 9
Creating MapleSim Model
FIGURE 66: MapleSim Model of Double Pendulum
Obtaining multibody equations and solving them
Mass Matrix
62
72.
Case Study 3: Four-Bar Mechanism
Dynamic Analysis
FIGURE 68: A Fourbar Mechanism
The dimensions and mass properties of the Four Bar mechanism are given in the table
below:
Link Lengths 0 = 4, 1 = 1, 2 = 5, 3 = 4
Distance of mass centers
= , = 1,2,3
2
Link masses = 1, = 1,2,3
Moment of inertias m i l2
i
= , i = 1,2,3
12
Gravitational acceleration = 9.81 −2
Torque 6 N.m
Lagrangian Formulation
72
73.
The Equations of Motion(EOM) for the overall system are derived by treating the four-bar
linkage as being composed of two dyads, (a) Dyad 1 is the 2 DOF left chain ( combination of
link 1 and 2 and b) Dyad 2 is the 1 DOF right chain (only link 3 ), as shown in the figure below.
FIGURE 69: A Fourbar Mechanism being decomposed into two Dyads
The EOM of each (unconstraint) subsystems are derived independently by the Lagragian‟s
method, where
For Dyad 1
73
74.
For Dyad 2
The constraint equations are then obtained from the requirement that Dyad 1 and Dyad 2 to stay
connected at the cut joint, which can be expressed in matrix form as
We can obtain the Jacobian matrix of the constraint as
The EOM of the combined overall system can be finally be modularly constructed as an index-3
DAEs as
74
75.
Where
From the constraint equation we can get
We can also determine as
That is
It means that the above expression is always zero. Since we choose θ1 as the independent
variable, we can rewrite
And we can also get
Where S is a 3×1 matrix,
75
76.
EOM can be rewritten to
We can show that,
We can also derive that
We multiply ST to both sides of EOM ,
In forward dynamics, we take the actuate torques as input, and take the motion of the joint as
output. We can find the motion according to the equation
In inverse dynamics, we take the joint motion as input, and take the actuate torques as output,
Analytical Model
Our goal is to be able to implement the model described before in a real-time application. We use
Matlab for our Simulation.
We use the Compliance based method to formulate the EOM into state space form and simulate
for 10secs.
And plot the angular orientations and end effector trajectory.
76
77.
MapleSim Model
The model looks as shown in the figure below
FIGURE 70: MapleSim Model of a Fourbar
Symbolic multibody equations
Mass Matrix (M)
77
82.
Conclusion
Thus, we can clearly see that the analytical formulation of the above examples is a very
tedious and time consuming process and virtual prototyping techniques improve the ease
of modeling with reasonable errors. MapleSIm also provides symbolic modeling
techniques wherein the dynamic equations of motion of a given system can be extracted
out which can be a novel area of interest.
82
83.
References
“Control of Mechanical Systems with Rolling Contraints: Application to Dynamic
Control of Mobile Robots”, Nilanjan Sarkar,Xiaoping Yun and Vijay Kumar
83
Clipping is a handy way to collect and organize the most important slides from a presentation. You can keep your great finds in clipboards organized around topics.
Be the first to comment